public class ConnectionWrapper extends BaseSql
autoCommit, checkConnectionIsValidTimes, closeCurrResult, iosLevelMap, ipPoolLock, ipsPool, isNewConnection, isSSLLoad, lob_ret, openStatements, redirect, roundIdx, RsHoldablity, slowSQLBean, sqlE, unConList, useSSL, validTaskExecutor| 构造器和说明 |
|---|
ConnectionWrapper(XgPooledConnection xgPConnection,
Connection xgConn,
boolean isD) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clearWarnings()
清除为此 Connection 对象报告的所有警告。
|
void |
close()
立即释放此 Connection 对象的数据库和 JDBC 资源,而不是等待它们被自动释放。
|
protected void |
close(boolean closeEvent)
closeEvent 为true
|
void |
commit()
使自从上一次提交/回滚以来进行的所有更改成为持久更改,并释放此 Connection 对象当前保存的所有数据库锁定。
|
Array |
createArrayOf(String typeName,
Object[] elements)
------------------------ end ------------------------------
|
Blob |
createBlob()
创建XUGU Blob对象
|
Clob |
createClob()
创建XUGU Clob对象
|
Statement |
createStatement()
创建一个 Statement 对象来将 SQL 语句发送到数据库。
|
Statement |
createStatement(int resultSetType,
int resultSetConcurrency)
创建一个 Statement 对象,该对象将生成具有给定类型和并发性的 ResultSet 对象。
|
Statement |
createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
创建一个 Statement 对象,该对象将生成具有给定类型、并发性和可保存性的 ResultSet 对象。
|
Struct |
createStruct(String typeName,
Object[] attributes) |
boolean |
getAutoCommit()
检索此 Connection 对象的当前自动提交模式
|
String |
getCatalog()
检索此 Connection 对象的当前目录名称。
|
Properties |
getClientInfo() |
String |
getClientInfo(String name) |
int |
getHoldability()
检索使用此 Connection 对象创建的 ResultSet 对象的当前可保存性。
|
DatabaseMetaData |
getMetaData()
获取 DatabaseMetaData 对象,该对象包含关于 Connection 对象连接到的数据库的元数据。
|
int |
getTransactionIsolation()
检索此 Connection 对象的当前事务隔离级别。
|
Map |
getTypeMap()
将给定的 TypeMap 对象安装为此 Connection 对象的类型映射表。
|
SQLWarning |
getWarnings()
检索此 Connection 对象上的调用报告的第一个警告。
|
boolean |
isClosed()
检索此 Connection 对象是否已经被关闭。
|
boolean |
isReadOnly()
检索此 Connection 对象是否处于只读模式。
|
boolean |
isValid(int timeout)
检查连接对象是否有效
|
String |
nativeSQL(String sql)
将给定的 SQL 语句转换成系统本机 SQL 语法。
|
CallableStatement |
prepareCall(String sql)
创建一个 CallableStatement 对象来调用数据库存储过程。
|
CallableStatement |
prepareCall(String sql,
int resultSetType,
int resultSetConcurrency)
创建一个 CallableStatement 对象,该对象将生成具有给定类型和并发性的 ResultSet 对象。
|
CallableStatement |
prepareCall(String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
创建一个 CallableStatement 对象,该对象将生成具有给定类型和并发性的 ResultSet 对象。
|
PreparedStatement |
prepareStatement(String sql)
创建一个 PreparedStatement 对象来将参数化的 SQL 语句发送到数据库。
|
PreparedStatement |
prepareStatement(String sql,
int autoGeneratedKeys)
创建一个默认 PreparedStatement 对象,该对象能检索自动生成的键。
|
PreparedStatement |
prepareStatement(String sql,
int[] columnIndexes)
创建一个能够返回由给定数组指定的自动生成键的默认 PreparedStatement 对象。
|
PreparedStatement |
prepareStatement(String sql,
int resultSetType,
int resultSetConcurrency)
创建一个 PreparedStatement 对象,该对象将生成具有给定类型和并发性的 ResultSet 对象。
|
PreparedStatement |
prepareStatement(String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
创建一个 PreparedStatement 对象,该对象将生成具有给定类型、并发性和可保存性的 ResultSet 对象。
|
PreparedStatement |
prepareStatement(String sql,
String[] columnNames)
创建一个能够返回由给定数组指定的自动生成键的默认 PreparedStatement 对象。
|
void |
releaseSavepoint(Savepoint savepoint)
从当前事务中移除给定 Savepoint 对象。
|
void |
rollback()
取消在当前事务中进行的所有更改,并释放此 Connection 对象当前保存的所有数据库锁定。
|
void |
rollback(Savepoint savepoint)
取消设置给定 Savepoint 对象之后进行的所有更改。
|
void |
setAutoCommit(boolean autoCommit)
将此连接的自动提交模式设置为给定状态。
|
void |
setCatalog(String catalog)
设置给定目录名称,以便选择要在其中进行工作的此 Connection 对象数据库的子空间。
|
void |
setHoldability(int holdability)
将使用此 Connection 对象创建的 ResultSet 对象的可保存性 (holdability) 更改为给定可保存性。
|
void |
setReadOnly(boolean readOnly)
将此连接设置为只读模式,作为驱动程序启用数据库优化的提示。
|
Savepoint |
setSavepoint()
在当前事务中创建一个未命名的保存点 (savepoint),并返回表示它的新 Savepoint 对象。
|
Savepoint |
setSavepoint(String name)
在当前事务中创建一个具有给定名称的保存点,并返回表示它的新 Savepoint 对象。
|
void |
setTransactionIsolation(int level)
试图将此 Connection 对象的事务隔离级别更改为给定的级别。
|
Object |
unwrap(Class iface) |
checkAndFireConnectionErrorabort, addDataType, checkRecordSlowSQL, checkSQLNull, clearBuffer, cloneCurConnection, closeAllOpenStatements, CreateAndInitArrayList, createNClob, createSQLXML, getBatchOrMoreResultMode, getCharSet, getClientInformation, getCloseTime, getConnState, getDataBase, getDatabseMajorVersion, getDatabseMinorVersion, getIO, getIsStreamEnd, getNetworkTimeout, getObject, getRealTimeout, getRoundIdx, getSchema, getServerIp, getServerPort, getStreamErrorVector, getUser, getValidTaskExecutor, is301Protocol, isNewConnection, isUseBatch, isValidateFlag, isWrapperFor, lobStatement, parserXml, sendHalt, setClientInfo, setClientInfo, setClose, setIsora, setNetworkTimeout, setNewConnection, setRoundIdx, setSchema, setTypeMap, setValidateFlag, setValidTaskExecutor, useLobDescribModepublic ConnectionWrapper(XgPooledConnection xgPConnection, Connection xgConn, boolean isD)
public void clearWarnings()
throws SQLException
Connection---暂时不考虑实现
clearWarnings 在接口中 ConnectionclearWarnings 在类中 ConnectionSQLExceptionpublic void close()
throws SQLException
Connection在已经关闭的 Connection 对象上调用 close 方法是无操作 (no-op)。
close 在接口中 AutoCloseableclose 在接口中 Connectionclose 在类中 ConnectionSQLExceptionpublic void commit()
throws SQLException
Connectioncommit 在接口中 Connectioncommit 在类中 ConnectionSQLExceptionpublic Array createArrayOf(String typeName, Object[] elements) throws SQLException
ConnectioncreateArrayOf 在接口中 ConnectioncreateArrayOf 在类中 ConnectionSQLExceptionpublic Blob createBlob() throws SQLException
ConnectioncreateBlob 在接口中 ConnectioncreateBlob 在类中 ConnectionSQLExceptionpublic Clob createClob() throws SQLException
ConnectioncreateClob 在接口中 ConnectioncreateClob 在类中 ConnectionSQLExceptionpublic Statement createStatement() throws SQLException
Connection没有参数的 SQL 语句通常使用 Statement 对象执行
createStatement 在接口中 ConnectioncreateStatement 在类中 ConnectionSQLExceptionpublic Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException
ConnectioncreateStatement 在接口中 ConnectioncreateStatement 在类中 ConnectionSQLExceptionpublic Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
ConnectioncreateStatement 在接口中 ConnectioncreateStatement 在类中 ConnectionSQLExceptionpublic Struct createStruct(String typeName, Object[] attributes) throws SQLException
createStruct 在接口中 ConnectioncreateStruct 在类中 ConnectionSQLExceptionpublic boolean getAutoCommit()
throws SQLException
ConnectiongetAutoCommit 在接口中 ConnectiongetAutoCommit 在类中 ConnectionSQLExceptionpublic String getCatalog() throws SQLException
ConnectiongetCatalog 在接口中 ConnectiongetCatalog 在类中 ConnectionSQLExceptionpublic Properties getClientInfo() throws SQLException
getClientInfo 在接口中 ConnectiongetClientInfo 在类中 ConnectionSQLExceptionpublic String getClientInfo(String name) throws SQLException
getClientInfo 在接口中 ConnectiongetClientInfo 在类中 ConnectionSQLExceptionpublic int getHoldability()
throws SQLException
Connection---暂时考虑不实现
getHoldability 在接口中 ConnectiongetHoldability 在类中 ConnectionSQLExceptionpublic DatabaseMetaData getMetaData() throws SQLException
ConnectiongetMetaData 在接口中 ConnectiongetMetaData 在类中 ConnectionSQLExceptionpublic int getTransactionIsolation()
throws SQLException
ConnectiongetTransactionIsolation 在接口中 ConnectiongetTransactionIsolation 在类中 ConnectionSQLExceptionpublic Map getTypeMap() throws SQLException
ConnectiongetTypeMap 在接口中 ConnectiongetTypeMap 在类中 ConnectionSQLExceptionpublic SQLWarning getWarnings() throws SQLException
Connection---暂时不考虑实现
getWarnings 在接口中 ConnectiongetWarnings 在类中 ConnectionSQLExceptionpublic boolean isClosed()
Connection如果已经在连接上调用 close 方法或者发生某些严重的错误,则关闭 connection。 此方法只保证在已经调用 Connection.close 方法之后被调用时返回 true。
isClosed 在接口中 ConnectionisClosed 在类中 Connectionpublic boolean isReadOnly()
throws SQLException
ConnectionisReadOnly 在接口中 ConnectionisReadOnly 在类中 ConnectionSQLExceptionpublic boolean isValid(int timeout)
throws SQLException
ConnectionisValid 在接口中 ConnectionisValid 在类中 Connectiontimeout - 等待用来验证连接是否完成的数据库操作的时间,以秒为单位SQLExceptionpublic String nativeSQL(String sql) throws SQLException
Connection---暂时不实现
暂时实现为和服务器编码(UTF-8)一致,将发送语句先转成连接串编码,然后在构造utf-8码的字串发给服务器
nativeSQL 在接口中 ConnectionnativeSQL 在类中 ConnectionSQLExceptionpublic CallableStatement prepareCall(String sql) throws SQLException
ConnectionprepareCall 在接口中 ConnectionprepareCall 在类中 ConnectionSQLExceptionpublic CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
ConnectionprepareCall 在接口中 ConnectionprepareCall 在类中 ConnectionSQLExceptionpublic CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
ConnectionprepareCall 在接口中 ConnectionprepareCall 在类中 ConnectionSQLExceptionpublic PreparedStatement prepareStatement(String sql) throws SQLException
Connection带有 IN 参数或不带有 IN 参数的 SQL 语句都可以被预编译并存储在 PreparedStatement 对象中。 然后可以有效地使用此对象来多次执行该语句。
prepareStatement 在接口中 ConnectionprepareStatement 在类中 ConnectionSQLExceptionpublic PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException
ConnectionprepareStatement 在接口中 ConnectionprepareStatement 在类中 ConnectionSQLExceptionpublic PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException
Connection带有 IN 参数或不带有 IN 参数的 SQL 语句都可以被预编辑并存储在 PreparedStatement 对象中。 然后可以有效地使用此对象来多次执行该语句。
---暂时考虑不实现
prepareStatement 在接口中 ConnectionprepareStatement 在类中 ConnectionSQLExceptionpublic PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException
ConnectionprepareStatement 在接口中 ConnectionprepareStatement 在类中 ConnectionSQLExceptionpublic PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
ConnectionprepareStatement 在接口中 ConnectionprepareStatement 在类中 ConnectionSQLExceptionpublic PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
ConnectionprepareStatement 在接口中 ConnectionprepareStatement 在类中 ConnectionSQLExceptionpublic void releaseSavepoint(Savepoint savepoint) throws SQLException
ConnectionreleaseSavepoint 在接口中 ConnectionreleaseSavepoint 在类中 ConnectionSQLExceptionpublic void rollback()
throws SQLException
Connectionrollback 在接口中 Connectionrollback 在类中 ConnectionSQLExceptionpublic void rollback(Savepoint savepoint) throws SQLException
Connection此方法应该只在已禁用自动提交时使用。
rollback 在接口中 Connectionrollback 在类中 ConnectionSQLExceptionpublic void setAutoCommit(boolean autoCommit)
throws SQLException
ConnectionsetAutoCommit 在接口中 ConnectionsetAutoCommit 在类中 ConnectionSQLExceptionpublic void setCatalog(String catalog) throws SQLException
ConnectionsetCatalog 在接口中 ConnectionsetCatalog 在类中 ConnectionSQLExceptionpublic void setHoldability(int holdability)
throws SQLException
Connection---暂时考虑不实现
setHoldability 在接口中 ConnectionsetHoldability 在类中 ConnectionSQLExceptionpublic void setReadOnly(boolean readOnly)
throws SQLException
Connection注:此方法无法在事务处理期间调用。
setReadOnly 在接口中 ConnectionsetReadOnly 在类中 ConnectionSQLExceptionpublic Savepoint setSavepoint() throws SQLException
ConnectionsetSavepoint 在接口中 ConnectionsetSavepoint 在类中 ConnectionSQLExceptionpublic Savepoint setSavepoint(String name) throws SQLException
ConnectionsetSavepoint 在接口中 ConnectionsetSavepoint 在类中 ConnectionSQLExceptionpublic void setTransactionIsolation(int level)
throws SQLException
ConnectionsetTransactionIsolation 在接口中 ConnectionsetTransactionIsolation 在类中 ConnectionSQLExceptionpublic Object unwrap(Class iface) throws SQLException
unwrap 在接口中 Wrapperunwrap 在类中 ConnectionSQLExceptionprotected void close(boolean closeEvent)
throws SQLException
SQLExceptionCopyright © 2025. All rights reserved.