strongduanmu commented on issue #10353:
URL:
https://github.com/apache/shardingsphere/issues/10353#issuecomment-841966098
@heysJava Hi, I have checked the Connection implementation of MySQL JDBC
driver. By default, similar parameter settings are also provided.
```java
private static final int DEFAULT_RESULT_SET_TYPE =
ResultSet.TYPE_FORWARD_ONLY;
private static final int DEFAULT_RESULT_SET_CONCURRENCY =
ResultSet.CONCUR_READ_ONLY;
/**
* SQL statements without parameters are normally executed using Statement
* objects. If the same SQL statement is executed many times, it is more
* efficient to use a PreparedStatement
*
* @return a new Statement object
* @throws SQLException
* passed through from the constructor
*/
public java.sql.Statement createStatement() throws SQLException {
return createStatement(DEFAULT_RESULT_SET_TYPE,
DEFAULT_RESULT_SET_CONCURRENCY);
}
```
Besides, the `ShardingSphereConnection` class provides multiple
createStatement overload methods to support user-specified parameters. I think
you should check the Spring `JdbcTemplate` documentation to see whether it
provides relevant methods to call other overloaded methods.
--
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]