| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | changeUser(String
the username to authenticate with userName, String the password to authenticate with newPassword)Changes the user on this connection by performing a re-authentication. |
| public PreparedStatement | Returns: prepared statementstatement sql)Prepares a statement on the client, using client-side emulation (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types. |
| public PreparedStatement | Returns: prepared statementstatement sql, int autoGenKeyIndex autoGenKeyIndex)Prepares a statement on the client, using client-side emulation (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types. |
| public PreparedStatement | Returns: prepared statementstatement sql, int resultSetType resultSetType, int resultSetConcurrency resultSetConcurrency)Prepares a statement on the client, using client-side emulation (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types. |
| public PreparedStatement | Returns: prepared statementstatement sql, int[] autoGenKeyIndexes autoGenKeyIndexes)Prepares a statement on the client, using client-side emulation (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types. |
| public PreparedStatement | Returns: prepared statementstatement sql, int resultSetType resultSetType, int resultSetConcurrency resultSetConcurrency, int resultSetHoldability resultSetHoldability)Prepares a statement on the client, using client-side emulation (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types. |
| public PreparedStatement | Returns: prepared statementstatement sql, String[] autoGenKeyColNames autoGenKeyColNames)Prepares a statement on the client, using client-side emulation (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types. |
| public void | |
| public void | doClose(Throwable
the exception that caused this method call cause, CloseOption... options indicating how the close was initiated and/or what should be performed during the close options)Close the connection and release resources. |
| public JdbcConnection | |
| public int | Returns: the number of active statementsReturns the number of statements active on this connection, which haven't been .close()d. |
| public int | Returns: the session value of 'auto_increment_increment'Returns the session value of 'auto_increment_increment' from the server if it exists, or '1' if not. |
| public CachedResultSetMetaData | Returns: metadata cached for the given SQL, or none if it doesn't exist.the query that is the key to the cache sql)Returns cached metadata (or null if not cached) for the given query, which must match _exactly_. |
| public String | |
| public ClientInfoProvider | |
| public String | Returns: current database nameRetrieves this connection object's current database name. |
| public String | |
| public String | |
| public long | Returns: number of ms that this connection has been idle, 0 if the driver is busy retrieving results.Reports how long this connection has been idle. |
| public Lock | |
| public Statement | |
| public JdbcConnection | |
| public JdbcConnection | |
| public JdbcPropertySet | |
| public List | |
| public ServerVersion | |
| public int | |
| public String | Returns: the comment that will be prepended to all statements sent to the server.Returns the comment that will be prepended to all statements sent to the server. |
| public boolean | Returns: true if has the same propertiesconnection c)Does this connection have the same properties as another? |
| public void | initializeResultsMetadataFromCache(String
the query that the metadata pertains too. sql, CachedResultSetMetaData metadata (if it exists) to populate the cache. cachedMetaData, ResultSetInternalMethods the result set to retrieve metadata from, or apply to. resultSet)Caches CachedResultSetMetaData that has been placed in the cache using the given SQL as a key. |
| public void | |
| public boolean | Returns: true if this connection currently a participant in an XA transactionIs this connection currently a participant in an XA transaction? |
| public boolean | |
| public boolean | Returns: true if the connection is read onlyin some cases, for example when restoring connection with autoReconnect=true, we can rely only on saved readOnly state, so use
useSessionStatus=false in that case useSessionStatus)Tests to see if the connection is in Read Only Mode. |
| public boolean | Returns: true if it is the same oneconnection c)Does this connection have the same resource name as the given connection (for XA)? |
| public boolean | Returns: true if the server is "local"Is the server this connection is connected to "local" (i.e. same host) as the application? |
| public boolean | Returns: true if this connection is connected to the first in the list.Is this connection connected to the first host in the list if there is a list of servers in the URL? |
| public boolean | Returns: true if lower_case_table_names is 'on'Is the server configured to use lower-case table names only? |
| public void | |
| public void | |
| public void | |
| public void | registerStatement(JdbcStatement
the Statement instance to remove stmt)Register a Statement instance as open. |
| public void | |
| public PreparedStatement | Returns: prepared statementstatement sql)Prepares a statement on the server (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the method java.sql.Connection.prepareStatement() with the same argument types. |
| public PreparedStatement | Returns: prepared statementstatement sql, int autoGenKeyIndex autoGenKeyIndex)Prepares a statement on the server (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the method java.sql.Connection.prepareStatement() with the same argument types. |
| public PreparedStatement | Returns: prepared statementstatement sql, int resultSetType resultSetType, int resultSetConcurrency resultSetConcurrency)Prepares a statement on the server (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the method java.sql.Connection.prepareStatement() with the same argument types. |
| public PreparedStatement | Returns: prepared statementstatement sql, int resultSetType resultSetType, int resultSetConcurrency resultSetConcurrency, int resultSetHoldability resultSetHoldability)Prepares a statement on the server (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the method java.sql.Connection.prepareStatement() with the same argument types. |
| public PreparedStatement | Returns: prepared statementstatement sql, int[] autoGenKeyIndexes autoGenKeyIndexes)Prepares a statement on the server (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the method java.sql.Connection.prepareStatement() with the same argument types. |
| public PreparedStatement | Returns: prepared statementstatement sql, String[] autoGenKeyColNames autoGenKeyColNames)Prepares a statement on the server (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the method java.sql.Connection.prepareStatement() with the same argument types. |
| public void | setDatabase(String
the database for this connection to use dbName)Set current database for this connection. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | setSessionMaxRows(int
the new max-rows value to set. max)Sets the sql select limit max-rows for this session if different from current. |
| public void | setStatementComment(String
the comment that will be prepended to all statements sent to the server. comment)Sets the comment that will be prepended to all statements sent to the server. |
| public void | |
| public boolean | |
| public void | |
| public void | unregisterStatement(JdbcStatement
the Statement instance to remove stmt)Remove the given statement from the list of open statements |
| public void |
| abortInternal | back to summary |
|---|---|
| public void abortInternal() throws SQLException Clobbers the physical network connection and marks this connection as closed.
| |
| changeUser | back to summary |
|---|---|
| public void changeUser(String userName, String newPassword) throws SQLException Changes the user on this connection by performing a re-authentication. If authentication fails, the connection is failed.
| |
| clientPrepareStatement | back to summary |
|---|---|
| public PreparedStatement clientPrepareStatement(String sql) throws SQLException Prepares a statement on the client, using client-side emulation (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
| |
| clientPrepareStatement | back to summary |
|---|---|
| public PreparedStatement clientPrepareStatement(String sql, int autoGenKeyIndex) throws SQLException Prepares a statement on the client, using client-side emulation (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
| |
| clientPrepareStatement | back to summary |
|---|---|
| public PreparedStatement clientPrepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException Prepares a statement on the client, using client-side emulation (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
| |
| clientPrepareStatement | back to summary |
|---|---|
| public PreparedStatement clientPrepareStatement(String sql, int[] autoGenKeyIndexes) throws SQLException Prepares a statement on the client, using client-side emulation (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
| |
| clientPrepareStatement | back to summary |
|---|---|
| public PreparedStatement clientPrepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException Prepares a statement on the client, using client-side emulation (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
| |
| clientPrepareStatement | back to summary |
|---|---|
| public PreparedStatement clientPrepareStatement(String sql, String[] autoGenKeyColNames) throws SQLException Prepares a statement on the client, using client-side emulation (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
| |
| decachePreparedStatement | back to summary |
|---|---|
| public void decachePreparedStatement(JdbcPreparedStatement pstmt) throws SQLException | |
| doClose | back to summary |
|---|---|
| public void doClose(Throwable cause, CloseOption... options) throws SQLException Close the connection and release resources.
| |
| getActiveMySQLConnection | back to summary |
|---|---|
| public JdbcConnection getActiveMySQLConnection() | |
| getActiveStatementCount | back to summary |
|---|---|
| public int getActiveStatementCount() Returns the number of statements active on this connection, which haven't been .close()d.
| |
| getAutoIncrementIncrement | back to summary |
|---|---|
| public int getAutoIncrementIncrement() Returns the session value of 'auto_increment_increment' from the server if it exists, or '1' if not.
| |
| getCachedMetaData | back to summary |
|---|---|
| public CachedResultSetMetaData getCachedMetaData(String sql) Returns cached metadata (or null if not cached) for the given query, which must match _exactly_.
Calls to this method must be guarded by the Connection object lock that can be obtained by
| |
| getCharacterSetMetadata | back to summary |
|---|---|
public String getCharacterSetMetadata()
| |
| getClientInfoProviderImpl | back to summary |
|---|---|
| public ClientInfoProvider getClientInfoProviderImpl() throws SQLException | |
| getDatabase | back to summary |
|---|---|
| public String getDatabase() Retrieves this connection object's current database name.
| |
| getHost | back to summary |
|---|---|
| public String getHost() | |
| getHostPortPair | back to summary |
|---|---|
| public String getHostPortPair() | |
| getIdleFor | back to summary |
|---|---|
| public long getIdleFor() Reports how long this connection has been idle. This time (reported in milliseconds) is updated once a query has completed.
| |
| getLock | back to summary |
|---|---|
| public Lock getLock() | |
| getMetadataSafeStatement | back to summary |
|---|---|
| public Statement getMetadataSafeStatement() throws SQLException | |
| getMultiHostParentProxy | back to summary |
|---|---|
| public JdbcConnection getMultiHostParentProxy() | |
| getMultiHostSafeProxy | back to summary |
|---|---|
| public JdbcConnection getMultiHostSafeProxy() | |
| getPropertySet | back to summary |
|---|---|
| public JdbcPropertySet getPropertySet() Redeclares com.
| |
| getQueryInterceptorsInstances | back to summary |
|---|---|
| public List | |
| getServerVersion | back to summary |
|---|---|
| public ServerVersion getServerVersion() | |
| getSessionMaxRows | back to summary |
|---|---|
| public int getSessionMaxRows() Returns the sql select limit max-rows for this session.
| |
| getStatementComment | back to summary |
|---|---|
| public String getStatementComment() Returns the comment that will be prepended to all statements sent to the server.
| |
| hasSameProperties | back to summary |
|---|---|
| public boolean hasSameProperties(JdbcConnection c) Does this connection have the same properties as another?
| |
| initializeResultsMetadataFromCache | back to summary |
|---|---|
| public void initializeResultsMetadataFromCache(String sql, CachedResultSetMetaData cachedMetaData, ResultSetInternalMethods resultSet) throws SQLException Caches CachedResultSetMetaData that has been placed in the cache using the given SQL as a key.
Calls to this method must be guarded by the Connection object lock that can be obtained by
| |
| initializeSafeQueryInterceptors | back to summary |
|---|---|
| public void initializeSafeQueryInterceptors() throws SQLException | |
| isInGlobalTx | back to summary |
|---|---|
| public boolean isInGlobalTx() Is this connection currently a participant in an XA transaction?
| |
| isProxySet | back to summary |
|---|---|
| public boolean isProxySet() | |
| isReadOnly | back to summary |
|---|---|
| public boolean isReadOnly(boolean useSessionStatus) throws SQLException Tests to see if the connection is in Read Only Mode.
| |
| isSameResource | back to summary |
|---|---|
| public boolean isSameResource(JdbcConnection c) Does this connection have the same resource name as the given connection (for XA)?
| |
| isServerLocal | back to summary |
|---|---|
| public boolean isServerLocal() throws SQLException Is the server this connection is connected to "local" (i.e. same host) as the application?
| |
| isSourceConnection | back to summary |
|---|---|
| public boolean isSourceConnection() Is this connection connected to the first host in the list if there is a list of servers in the URL?
| |
| lowerCaseTableNames | back to summary |
|---|---|
| public boolean lowerCaseTableNames() Is the server configured to use lower-case table names only?
| |
| ping | back to summary |
|---|---|
| public void ping() throws SQLException Detect if the connection is still good by sending a ping command to the server.
| |
| pingInternal | back to summary |
|---|---|
| public void pingInternal(boolean checkForClosedConnection, int timeoutMillis) throws SQLException | |
| recachePreparedStatement | back to summary |
|---|---|
| public void recachePreparedStatement(JdbcPreparedStatement pstmt) throws SQLException | |
| registerStatement | back to summary |
|---|---|
| public void registerStatement(JdbcStatement stmt) Register a Statement instance as open.
| |
| resetServerState | back to summary |
|---|---|
| public void resetServerState() throws SQLException Resets the server-side state of this connection. Doesn't work if isParanoid() is set (it will become a no-op in this case). Usually only used from connection pooling code.
| |
| serverPrepareStatement | back to summary |
|---|---|
| public PreparedStatement serverPrepareStatement(String sql) throws SQLException Prepares a statement on the server (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the method java.sql.Connection.prepareStatement() with the same argument types.
| |
| serverPrepareStatement | back to summary |
|---|---|
| public PreparedStatement serverPrepareStatement(String sql, int autoGenKeyIndex) throws SQLException Prepares a statement on the server (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the method java.sql.Connection.prepareStatement() with the same argument types.
| |
| serverPrepareStatement | back to summary |
|---|---|
| public PreparedStatement serverPrepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException Prepares a statement on the server (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the method java.sql.Connection.prepareStatement() with the same argument types.
| |
| serverPrepareStatement | back to summary |
|---|---|
| public PreparedStatement serverPrepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException Prepares a statement on the server (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the method java.sql.Connection.prepareStatement() with the same argument types.
| |
| serverPrepareStatement | back to summary |
|---|---|
| public PreparedStatement serverPrepareStatement(String sql, int[] autoGenKeyIndexes) throws SQLException Prepares a statement on the server (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the method java.sql.Connection.prepareStatement() with the same argument types.
| |
| serverPrepareStatement | back to summary |
|---|---|
| public PreparedStatement serverPrepareStatement(String sql, String[] autoGenKeyColNames) throws SQLException Prepares a statement on the server (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the method java.sql.Connection.prepareStatement() with the same argument types.
| |
| setDatabase | back to summary |
|---|---|
| public void setDatabase(String dbName) throws SQLException Set current database for this connection.
| |
| setFailedOver | back to summary |
|---|---|
public void setFailedOver(boolean flag)
| |
| setInGlobalTx | back to summary |
|---|---|
| public void setInGlobalTx(boolean flag) Set the state of being in a global (XA) transaction.
| |
| setProxy | back to summary |
|---|---|
| public void setProxy(JdbcConnection proxy) | |
| setReadOnlyInternal | back to summary |
|---|---|
| public void setReadOnlyInternal(boolean readOnlyFlag) throws SQLException | |
| setSessionMaxRows | back to summary |
|---|---|
| public void setSessionMaxRows(int max) throws SQLException Sets the sql select limit max-rows for this session if different from current.
| |
| setStatementComment | back to summary |
|---|---|
| public void setStatementComment(String comment) Sets the comment that will be prepended to all statements sent to the server. Do not use slash-star or star-slash tokens in the comment as these will be added by the driver itself.
| |
| shutdownServer | back to summary |
|---|---|
| public void shutdownServer() throws SQLException Used by MiniAdmin to shutdown a MySQL server
| |
| storesLowerCaseTableName | back to summary |
|---|---|
| public boolean storesLowerCaseTableName() | |
| throwConnectionClosedException | back to summary |
|---|---|
| public void throwConnectionClosedException() throws SQLException | |
| unregisterStatement | back to summary |
|---|---|
| public void unregisterStatement(JdbcStatement stmt) Remove the given statement from the list of open statements
| |
| unSafeQueryInterceptors | back to summary |
|---|---|
| public void unSafeQueryInterceptors() throws SQLException | |