华为云云数据库GaussDBjava.sql.Connection_云淘科技
java.sql.Connection是数据库连接接口。
方法名 |
返回值类型 |
支持JDBC 4 |
---|---|---|
abort(Executor executor) |
void |
Yes |
clearWarnings() |
void |
Yes |
close() |
void |
Yes |
commit() |
void |
Yes |
createArrayOf(String typeName, Object[] elements) |
Array |
Yes |
createBlob() |
Blob |
Yes |
createClob() |
Clob |
Yes |
createSQLXML() |
SQLXML |
Yes |
createStatement() |
Statement |
Yes |
createStatement(int resultSetType, int resultSetConcurrency) |
Statement |
Yes |
createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) |
Statement |
Yes |
getAutoCommit() |
Boolean |
Yes |
getCatalog() |
String |
Yes |
getClientInfo() |
Properties |
Yes |
getClientInfo(String name) |
String |
Yes |
getHoldability() |
int |
Yes |
getMetaData() |
DatabaseMetaData |
Yes |
getNetworkTimeout() |
int |
Yes |
getSchema() |
String |
Yes |
getTransactionIsolation() |
int |
Yes |
getTypeMap() |
Map<String,Class> |
Yes |
getWarnings() |
SQLWarning |
Yes |
isClosed() |
Boolean |
Yes |
isReadOnly() |
Boolean |
Yes |
isValid(int timeout) |
boolean |
Yes |
nativeSQL(String sql) |
String |
Yes |
prepareCall(String sql) |
CallableStatement |
Yes |
prepareCall(String sql, int resultSetType, int resultSetConcurrency) |
CallableStatement |
Yes |
prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) |
CallableStatement |
Yes |
prepareStatement(String sql) |
PreparedStatement |
Yes |
prepareStatement(String sql, int autoGeneratedKeys) |
PreparedStatement |
Yes |
prepareStatement(String sql, int[] columnIndexes) |
PreparedStatement |
Yes |
prepareStatement(String sql, int resultSetType, int resultSetConcurrency) |
PreparedStatement |
Yes |
prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) |
PreparedStatement |
Yes |
prepareStatement(String sql, String[] columnNames) |
PreparedStatement |
Yes |
releaseSavepoint(Savepoint savepoint) |
void |
Yes |
rollback() |
void |
Yes |
rollback(Savepoint savepoint) |
void |
Yes |
setAutoCommit(boolean autoCommit) |
void |
Yes |
setClientInfo(Properties properties) |
void |
Yes |
setClientInfo(String name,String value) |
void |
Yes |
setHoldability(int holdability) |
void |
Yes |
setNetworkTimeout(Executor executor, int milliseconds) |
void |
Yes |
setReadOnly(boolean readOnly) |
void |
Yes |
setSavepoint() |
Savepoint |
Yes |
setSavepoint(String name) |
Savepoint |
Yes |
setSchema(String schema) |
void |
Yes |
setTransactionIsolation(int level) |
void |
Yes |
setTypeMap(Map<String,Class> map) |
void |
Yes |
接口内部默认使用自动提交模式,若通过setAutoCommit(false)关闭自动提交,将会导致后面执行的语句都受到显式事务包裹,数据库中不支持事务中执行的语句不能在此模式下执行。
不支持软硬融合全密态数据库特性使用setClientInfo(“send_token”, null)传输密钥,使用setClientInfo(“clear_token”, null)销毁密钥(当前特性是实验室特性,使用时请联系华为工程师提供技术支持)。
父主题: JDBC接口参考
同意关联代理商云淘科技,购买华为云产品更优惠(QQ 78315851)
内容没看懂? 不太想学习?想快速解决? 有偿解决: 联系专家