HomeMogDBMogDB StackUqbar
v2.0

Documentation:v2.0

Supported Versions:

Other Versions:

java.sql.Statement

This section describes java.sql.Statement, the interface for executing SQL statements.

Table 1 Support status for java.sql.Statement

Method Name Return Type Support JDBC 4
close() void Yes
execute(String sql) Boolean Yes
executeQuery(String sql) ResultSet Yes
executeUpdate(String sql) int Yes
getConnection() Connection Yes
getResultSet() ResultSet Yes
getQueryTimeout() int Yes
getUpdateCount() int Yes
isClosed() Boolean Yes
setQueryTimeout(int seconds) void Yes
setFetchSize(int rows) void Yes
cancel() void Yes

img NOTE:

  • Using setFetchSize can reduce the memory occupied by result sets on the client. Result sets are packaged into cursors and segmented for processing, which will increase the communication traffic between the database and the client, affecting performance.
  • Database cursors are valid only within their transactions. If setFetchSize is set, set setAutoCommit(false) and commit transactions on the connection to flush service data to a database.
Copyright © 2011-2024 www.enmotech.com All rights reserved.