HTHou commented on a change in pull request #3181:
URL: https://github.com/apache/iotdb/pull/3181#discussion_r632302987



##########
File path: jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBStatement.java
##########
@@ -581,18 +590,21 @@ public void setMaxFieldSize(int arg0) throws SQLException 
{
 
   @Override
   public int getMaxRows() throws SQLException {
-    throw new SQLException("Not support getMaxRows");
+    return this.maxRows;
   }
 
   @Override
   public void setMaxRows(int num) throws SQLException {
-    throw new SQLException(
-        "Not support getMaxRows" + ". Please use the LIMIT clause in a query 
instead.");
+    checkConnection("setMaxRows");
+    if (num <= 0) {
+      throw new SQLException(String.format("maxRows %d must be > 0!", num));
+    }
+    this.maxRows = num;
   }
 
   @Override
   public boolean getMoreResults() throws SQLException {
-    throw new SQLException("Not support getMoreResults");
+    return false;

Review comment:
       Copied from JDBC javaDoc. I agree with @liutaohua .
   
   ```
   boolean getMoreResults()
                   throws SQLException
   Moves to this Statement object's next result, returns true if it is a 
ResultSet object, and implicitly closes any current ResultSet object(s) 
obtained with the method getResultSet.
   There are no more results when the following is true:
   
   
        // stmt is a Statement object
        ((stmt.getMoreResults() == false) && (stmt.getUpdateCount() == -1))
    
   Returns:
   true if the next result is a ResultSet object; false if it is an update 
count or there are no more results
   Throws:
   SQLException - if a database access error occurs or this method is called on 
a closed Statement
   ```




-- 
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