接口的使用
com.mysql.cj.jdbc.JdbcConnection
-
使用JdbcConnection的程序包 程序包 说明 com.mysql.cj.jdbc com.mysql.cj.jdbc.exceptions com.mysql.cj.jdbc.ha com.mysql.cj.jdbc.result -
-
com.mysql.cj.jdbc中JdbcConnection的使用
实现JdbcConnection的com.mysql.cj.jdbc中的类 修饰符和类型 类 说明 classConnectionImplA Connection represents a session with a specific database.classConnectionWrapperThis class serves as a wrapper for the connection object.声明为JdbcConnection的com.mysql.cj.jdbc中的字段 修饰符和类型 字段 说明 protected JdbcConnectionDatabaseMetaData. connThe connection to the databaseprotected JdbcConnectionStatementImpl. connectionThe connection that created usprotected JdbcConnectionConnectionWrapper. mc返回JdbcConnection的com.mysql.cj.jdbc中的方法 修饰符和类型 方法 说明 protected JdbcConnectionServerPreparedStatement. checkClosed()protected JdbcConnectionStatementImpl. checkClosed()Checks if closed() has been called, and throws an exception if soJdbcConnectionConnectionImpl. getActiveMySQLConnection()JdbcConnectionConnectionWrapper. getActiveMySQLConnection()JdbcConnectionJdbcConnection. getActiveMySQLConnection()static JdbcConnectionConnectionImpl. getInstance(HostInfo hostInfo)Creates a connection instance.JdbcConnectionConnectionImpl. getMultiHostParentProxy()JdbcConnectionConnectionWrapper. getMultiHostParentProxy()JdbcConnectionJdbcConnection. getMultiHostParentProxy()JdbcConnectionConnectionImpl. getMultiHostSafeProxy()JdbcConnectionConnectionWrapper. getMultiHostSafeProxy()JdbcConnectionJdbcConnection. getMultiHostSafeProxy()参数类型为JdbcConnection的com.mysql.cj.jdbc中的方法 修饰符和类型 方法 说明 voidStatementImpl. executeSimpleNonQuery(JdbcConnection c, String nonQuery)protected static CallableStatementCallableStatement. getInstance(JdbcConnection conn, CallableStatement.CallableStatementParamInfo paramInfo)Creates a callable statement instanceprotected static CallableStatementCallableStatement. getInstance(JdbcConnection conn, String sql, String db, boolean isFunctionCall)Creates a callable statement instanceprotected static ClientPreparedStatementClientPreparedStatement. getInstance(JdbcConnection conn, String sql, String db)Creates a prepared statement instanceprotected static ClientPreparedStatementClientPreparedStatement. getInstance(JdbcConnection conn, String sql, String db, QueryInfo cachedQueryInfo)Creates a prepared statement instanceprotected static ConnectionWrapperConnectionWrapper. getInstance(MysqlPooledConnection mysqlPooledConnection, JdbcConnection mysqlConnection, boolean forXa)protected static DatabaseMetaDataDatabaseMetaData. getInstance(JdbcConnection connToSet, String databaseToSet, boolean checkForInfoSchema, ResultSetFactory resultSetFactory)protected static MysqlPooledConnectionMysqlPooledConnection. getInstance(JdbcConnection connection)protected static MysqlXAConnectionMysqlXAConnection. getInstance(JdbcConnection mysqlConnection, boolean logXaCommands)protected static ServerPreparedStatementServerPreparedStatement. getInstance(JdbcConnection conn, String sql, String db, int resultSetType, int resultSetConcurrency)Creates a prepared statement instanceprotected static SuspendableXAConnectionSuspendableXAConnection. getInstance(JdbcConnection mysqlConnection)booleanConnectionImpl. hasSameProperties(JdbcConnection c)booleanConnectionWrapper. hasSameProperties(JdbcConnection c)booleanJdbcConnection. hasSameProperties(JdbcConnection c)Does this connection have the same properties as another?booleanConnectionImpl. isSameResource(JdbcConnection otherConnection)booleanConnectionWrapper. isSameResource(JdbcConnection c)booleanJdbcConnection. isSameResource(JdbcConnection c)Does this connection have the same resource name as the given connection (for XA)?protected ClientPreparedStatementClientPreparedStatement. prepareBatchedInsertSQL(JdbcConnection localConn, int numBatches)Returns a prepared statement for the number of batched parameters, used when re-writing batch INSERTs.protected ClientPreparedStatementServerPreparedStatement. prepareBatchedInsertSQL(JdbcConnection localConn, int numBatches)voidConnectionImpl. setProxy(JdbcConnection proxy)voidConnectionWrapper. setProxy(JdbcConnection conn)voidJdbcConnection. setProxy(JdbcConnection proxy)protected voidStatementImpl. setupStreamingTimeout(JdbcConnection con)Adjust net_write_timeout to a higher value if we're streaming result sets.参数类型为JdbcConnection的com.mysql.cj.jdbc中的构造器 构造器 说明 CallableStatement(JdbcConnection conn, CallableStatement.CallableStatementParamInfo paramInfo)Creates a new CallableStatementCallableStatement(JdbcConnection conn, String sql, String db, boolean isFunctionCall)Creates a new CallableStatementClientPreparedStatement(JdbcConnection conn, String db)Constructor used by server-side prepared statementsClientPreparedStatement(JdbcConnection conn, String sql, String db)Constructor for the PreparedStatement class.ClientPreparedStatement(JdbcConnection conn, String sql, String db, QueryInfo cachedQueryInfo)Creates a new PreparedStatement object.ConnectionWrapper(MysqlPooledConnection mysqlPooledConnection, JdbcConnection mysqlConnection, boolean forXa)Construct a new LogicalHandle and set instance variablesDatabaseMetaData(JdbcConnection connToSet, String databaseToSet, ResultSetFactory resultSetFactory)Creates a new DatabaseMetaData object.DatabaseMetaDataUsingInfoSchema(JdbcConnection connToSet, String databaseToSet, ResultSetFactory resultSetFactory)MysqlPooledConnection(JdbcConnection connection)Construct a new MysqlPooledConnection and set instance variablesMysqlXAConnection(JdbcConnection connection, boolean logXaCommands)ServerPreparedStatement(JdbcConnection conn, String sql, String db, int resultSetType, int resultSetConcurrency)Creates a new ServerPreparedStatement object.StatementImpl(JdbcConnection c, String db)Constructor for a Statement.SuspendableXAConnection(JdbcConnection connection) -
com.mysql.cj.jdbc.exceptions中JdbcConnection的使用
参数类型为JdbcConnection的com.mysql.cj.jdbc.exceptions中的方法 修饰符和类型 方法 说明 static SQLExceptionSQLError. createCommunicationsException(JdbcConnection conn, PacketSentTimeHolder packetSentTimeHolder, PacketReceivedTimeHolder packetReceivedTimeHolder, Exception underlyingException, ExceptionInterceptor interceptor)参数类型为JdbcConnection的com.mysql.cj.jdbc.exceptions中的构造器 构造器 说明 CommunicationsException(JdbcConnection conn, PacketSentTimeHolder packetSentTimeHolder, PacketReceivedTimeHolder packetReceivedTimeHolder, Exception underlyingException)ConnectionFeatureNotAvailableException(JdbcConnection conn, PacketSentTimeHolder packetSentTimeHolder, Exception underlyingException) -
com.mysql.cj.jdbc.ha中JdbcConnection的使用
com.mysql.cj.jdbc.ha中JdbcConnection的子接口 修饰符和类型 接口 说明 interfaceLoadBalancedConnectioninterfaceReplicationConnection实现JdbcConnection的com.mysql.cj.jdbc.ha中的类 修饰符和类型 类 说明 classLoadBalancedMySQLConnectionclassMultiHostMySQLConnectionEach instance of MultiHostMySQLConnection is coupled with a MultiHostConnectionProxy instance.classReplicationMySQLConnection返回JdbcConnection的com.mysql.cj.jdbc.ha中的方法 修饰符和类型 方法 说明 static JdbcConnectionFailoverConnectionProxy. createProxyInstance(ConnectionUrl connectionUrl)JdbcConnectionMultiHostMySQLConnection. getActiveMySQLConnection()JdbcConnectionReplicationMySQLConnection. getActiveMySQLConnection()JdbcConnectionReplicationConnection. getCurrentConnection()JdbcConnectionReplicationConnectionProxy. getCurrentConnection()JdbcConnectionReplicationMySQLConnection. getCurrentConnection()default JdbcConnectionReplicationConnection. getMasterConnection()已过时。JdbcConnectionReplicationConnectionProxy. getMasterConnection()已过时。JdbcConnectionMultiHostMySQLConnection. getMultiHostParentProxy()JdbcConnectionMultiHostMySQLConnection. getMultiHostSafeProxy()protected JdbcConnectionMultiHostConnectionProxy. getParentProxy()Get this connection's parent proxy.protected JdbcConnectionMultiHostConnectionProxy. getProxy()Get this connection's proxy.JdbcConnectionReplicationConnection. getReplicaConnection()JdbcConnectionReplicationMySQLConnection. getReplicaConnection()JdbcConnectionReplicationConnectionProxy. getReplicasConnection()default JdbcConnectionReplicationConnection. getSlavesConnection()已过时。JdbcConnectionReplicationConnectionProxy. getSlavesConnection()已过时。JdbcConnectionReplicationConnection. getSourceConnection()JdbcConnectionReplicationConnectionProxy. getSourceConnection()JdbcConnectionReplicationMySQLConnection. getSourceConnection()JdbcConnectionBalanceStrategy. pickConnection(InvocationHandler proxy, List<String> configuredHosts, Map<String,JdbcConnection> liveConnections, long[] responseTimes, int numRetries)Called by the driver to pick a new connection to route requests over.参数类型为JdbcConnection的com.mysql.cj.jdbc.ha中的方法 修饰符和类型 方法 说明 booleanMultiHostMySQLConnection. hasSameProperties(JdbcConnection c)booleanReplicationMySQLConnection. hasSameProperties(JdbcConnection c)booleanMultiHostMySQLConnection. isSameResource(JdbcConnection otherConnection)protected voidLoadBalancedConnectionProxy. propagateProxyDown(JdbcConnection proxyConn)Propagates the connection proxy down through all live connections.protected voidMultiHostConnectionProxy. propagateProxyDown(JdbcConnection proxyConn)Propagates the connection proxy down through the multi-host connections chain.protected voidReplicationConnectionProxy. propagateProxyDown(JdbcConnection proxyConn)Propagates the connection proxy down through all live connections.protected voidMultiHostConnectionProxy. setProxy(JdbcConnection proxyConn)Sets this connection's proxy.voidMultiHostMySQLConnection. setProxy(JdbcConnection proxy)voidReplicationMySQLConnection. setProxy(JdbcConnection proxy)类型变量类型为JdbcConnection的com.mysql.cj.jdbc.ha中的方法参数 修饰符和类型 方法 说明 JdbcConnectionBalanceStrategy. pickConnection(InvocationHandler proxy, List<String> configuredHosts, Map<String,JdbcConnection> liveConnections, long[] responseTimes, int numRetries)Called by the driver to pick a new connection to route requests over.ConnectionImplBestResponseTimeBalanceStrategy. pickConnection(InvocationHandler proxy, List<String> configuredHosts, Map<String,JdbcConnection> liveConnections, long[] responseTimes, int numRetries)ConnectionImplRandomBalanceStrategy. pickConnection(InvocationHandler proxy, List<String> configuredHosts, Map<String,JdbcConnection> liveConnections, long[] responseTimes, int numRetries)ConnectionImplSequentialBalanceStrategy. pickConnection(InvocationHandler proxy, List<String> configuredHosts, Map<String,JdbcConnection> liveConnections, long[] responseTimes, int numRetries)ConnectionImplServerAffinityStrategy. pickConnection(InvocationHandler proxy, List<String> configuredHosts, Map<String,JdbcConnection> liveConnections, long[] responseTimes, int numRetries) -
com.mysql.cj.jdbc.result中JdbcConnection的使用
声明为JdbcConnection的com.mysql.cj.jdbc.result中的字段 修饰符和类型 字段 说明 protected JdbcConnectionResultSetImpl. connectionThe Connection instance that created us返回JdbcConnection的com.mysql.cj.jdbc.result中的方法 修饰符和类型 方法 说明 protected JdbcConnectionResultSetImpl. checkClosed()Ensures that the result set is not closedJdbcConnectionResultSetImpl. getConnection()参数类型为JdbcConnection的com.mysql.cj.jdbc.result中的构造器 构造器 说明 ResultSetFactory(JdbcConnection connection, StatementImpl creatorStmt)ResultSetImpl(OkPacket ok, JdbcConnection conn, StatementImpl creatorStmt)Create a result set for an executeUpdate statement.ResultSetImpl(ResultsetRows tuples, JdbcConnection conn, StatementImpl creatorStmt)Creates a new ResultSet object.UpdatableResultSet(ResultsetRows tuples, JdbcConnection conn, StatementImpl creatorStmt)Creates a new ResultSet object.
-