jixuan1989 commented on a change in pull request #2444:
URL: https://github.com/apache/iotdb/pull/2444#discussion_r553764432



##########
File path: jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBPreparedStatement.java
##########
@@ -429,7 +475,16 @@ public void setTimestamp(int parameterIndex, Timestamp x) {
 
   @Override
   public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) 
throws SQLException {
-    throw new SQLException(METHOD_NOT_SUPPORTED_STRING);
+   // throw new SQLException(METHOD_NOT_SUPPORTED_STRING);

Review comment:
       can we use timstamp (long)?

##########
File path: jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBPreparedStatement.java
##########
@@ -411,12 +441,28 @@ public void setString(int parameterIndex, String x) {
 
   @Override
   public void setTime(int parameterIndex, Time x) throws SQLException {
-    throw new SQLException(METHOD_NOT_SUPPORTED_STRING);
+   // throw new SQLException(METHOD_NOT_SUPPORTED_STRING);

Review comment:
       can we use timstamp (long)?

##########
File path: jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBPreparedStatement.java
##########
@@ -411,12 +441,28 @@ public void setString(int parameterIndex, String x) {
 
   @Override
   public void setTime(int parameterIndex, Time x) throws SQLException {
-    throw new SQLException(METHOD_NOT_SUPPORTED_STRING);
+   // throw new SQLException(METHOD_NOT_SUPPORTED_STRING);
+         ZonedDateTime zonedDateTime = 
ZonedDateTime.ofInstant(Instant.ofEpochMilli(x.getTime()),
+                   super.zoneId);
+               this.parameters.put(parameterIndex, zonedDateTime
+                   .format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));
+   // throw new SQLException(Constant.PARAMETER_SUPPORTED);
+  
+   
   }
 
   @Override
   public void setTime(int parameterIndex, Time x, Calendar cal) throws 
SQLException {
-    throw new SQLException(METHOD_NOT_SUPPORTED_STRING);
+   // throw new SQLException(METHOD_NOT_SUPPORTED_STRING);
+         ZonedDateTime zonedDateTime=null;

Review comment:
       can we use timstamp (long)?

##########
File path: jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBPreparedStatement.java
##########
@@ -375,13 +401,15 @@ public void setObject(int parameterIndex, Object x) 
throws SQLException {
 
   @Override
   public void setObject(int parameterIndex, Object x, int targetSqlType) 
throws SQLException {
-    throw new SQLException(METHOD_NOT_SUPPORTED_STRING);
+    //throw new SQLException(METHOD_NOT_SUPPORTED_STRING);
+         throw new SQLException(Constant.PARAMETER_SUPPORTED);
   }
 
   @Override
   public void setObject(int parameterIndex, Object x, int targetSqlType, int 
scaleOrLength)
       throws SQLException {
-    throw new SQLException(METHOD_NOT_SUPPORTED_STRING);
+    //throw new SQLException(METHOD_NOT_SUPPORTED_STRING);

Review comment:
       better to implement it

##########
File path: jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBPreparedStatement.java
##########
@@ -237,39 +247,46 @@ public void setBoolean(int parameterIndex, boolean x) {
 
   @Override
   public void setByte(int parameterIndex, byte x) throws SQLException {
-    throw new SQLException(METHOD_NOT_SUPPORTED_STRING);
+    //throw new SQLException(METHOD_NOT_SUPPORTED_STRING);
+         throw new SQLException(Constant.PARAMETER_SUPPORTED);
   }
 
   @Override
   public void setBytes(int parameterIndex, byte[] x) throws SQLException {
-    throw new SQLException(METHOD_NOT_SUPPORTED_STRING);
+    //throw new SQLException(METHOD_NOT_SUPPORTED_STRING);

Review comment:
       for `Binary` type.

##########
File path: jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBPreparedStatement.java
##########
@@ -375,13 +401,15 @@ public void setObject(int parameterIndex, Object x) 
throws SQLException {
 
   @Override
   public void setObject(int parameterIndex, Object x, int targetSqlType) 
throws SQLException {
-    throw new SQLException(METHOD_NOT_SUPPORTED_STRING);
+    //throw new SQLException(METHOD_NOT_SUPPORTED_STRING);

Review comment:
       better to implement it




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to