public final class ShardingConnection extends AbstractConnectionAdapter
| 构造器和说明 |
|---|
ShardingConnection() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
Statement |
createStatement() |
Statement |
createStatement(int resultSetType,
int resultSetConcurrency) |
Statement |
createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
Connection |
getConnection(String dataSourceName,
SQLType sqlType)
根据数据源名称获取相应的数据库连接.
|
Collection<Connection> |
getConnections() |
DatabaseMetaData |
getMetaData() |
PreparedStatement |
prepareStatement(String sql) |
PreparedStatement |
prepareStatement(String sql,
int autoGeneratedKeys) |
PreparedStatement |
prepareStatement(String sql,
int[] columnIndexes) |
PreparedStatement |
prepareStatement(String sql,
int resultSetType,
int resultSetConcurrency) |
PreparedStatement |
prepareStatement(String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
PreparedStatement |
prepareStatement(String sql,
String[] columnNames) |
void |
release(Connection connection)
释放数据库连接.
|
clearWarnings, commit, getAutoCommit, getHoldability, getTransactionIsolation, getWarnings, isClosed, isReadOnly, rollback, setAutoCommit, setHoldability, setReadOnly, setTransactionIsolationabort, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStruct, getCatalog, getClientInfo, getClientInfo, getNetworkTimeout, getSchema, getTypeMap, isValid, nativeSQL, prepareCall, prepareCall, prepareCall, releaseSavepoint, rollback, setCatalog, setClientInfo, setClientInfo, setNetworkTimeout, setSavepoint, setSavepoint, setSchema, setTypeMapisWrapperFor, recordMethodInvocation, replayMethodsInvocation, throwSQLExceptionIfNecessary, unwrapclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisWrapperFor, unwrappublic Connection getConnection(String dataSourceName, SQLType sqlType) throws SQLException
dataSourceName - 数据源名称sqlType - SQL语句类型SQLException - SQL异常public void release(Connection connection)
connection - 待释放的数据库连接public DatabaseMetaData getMetaData() throws SQLException
SQLExceptionpublic PreparedStatement prepareStatement(String sql) throws SQLException
SQLExceptionpublic PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
SQLExceptionpublic PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
SQLExceptionpublic PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException
SQLExceptionpublic PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException
SQLExceptionpublic PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException
SQLExceptionpublic Statement createStatement() throws SQLException
SQLExceptionpublic Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException
SQLExceptionpublic Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
SQLExceptionpublic Collection<Connection> getConnections()
getConnections 在类中 AbstractConnectionAdapterpublic void close()
throws SQLException
close 在接口中 AutoCloseableclose 在接口中 Connectionclose 在类中 AbstractConnectionAdapterSQLExceptionCopyright © 2017. All rights reserved.