|
MySQL Connector/J size='-1'>5.1.6 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Connection
This interface contains methods that are considered the "vendor extension" to the JDBC API for MySQL's implementation of java.sql.Connection. For those looking further into the driver implementation, it is not an API that is used for plugability of implementations inside our driver (which is why there are still references to ConnectionImpl throughout the code).
| Field Summary |
|---|
| Fields inherited from interface java.sql.Connection |
|---|
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE |
| Method Summary | |
|---|---|
void |
changeUser(java.lang.String userName,
java.lang.String newPassword)
Changes the user on this connection by performing a re-authentication. |
void |
clearHasTriedMaster()
|
java.sql.PreparedStatement |
clientPrepareStatement(java.lang.String sql)
Prepares a statement on the client, using client-side emulation (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types. |
java.sql.PreparedStatement |
clientPrepareStatement(java.lang.String sql,
int autoGenKeyIndex)
Prepares a statement on the client, using client-side emulation (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types. |
java.sql.PreparedStatement |
clientPrepareStatement(java.lang.String sql,
int[] autoGenKeyIndexes)
Prepares a statement on the client, using client-side emulation (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types. |
java.sql.PreparedStatement |
clientPrepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
Prepares a statement on the client, using client-side emulation (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types. |
java.sql.PreparedStatement |
clientPrepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
Prepares a statement on the client, using client-side emulation (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types. |
java.sql.PreparedStatement |
clientPrepareStatement(java.lang.String sql,
java.lang.String[] autoGenKeyColNames)
Prepares a statement on the client, using client-side emulation (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types. |
int |
getActiveStatementCount()
Returns the number of statements active on this connection, which haven't been .close()d. |
long |
getIdleFor()
Reports how long this connection has been idle. |
Log |
getLog()
Returns the log mechanism that should be used to log information from/for this Connection. |
java.lang.String |
getServerCharacterEncoding()
Returns the server's character set |
java.util.TimeZone |
getServerTimezoneTZ()
Returns the TimeZone that represents the configured timezone for the server. |
java.lang.String |
getStatementComment()
Returns the comment that will be prepended to all statements sent to the server. |
boolean |
hasTriedMaster()
Has this connection tried to execute a query on the "master" server (first host in a multiple host list). |
void |
initializeExtension(Extension ex)
|
boolean |
isAbonormallyLongQuery(long millisOrNanos)
|
boolean |
isInGlobalTx()
Is this connection currently a participant in an XA transaction? |
boolean |
isMasterConnection()
Is this connection connected to the first host in the list if there is a list of servers in the URL? |
boolean |
isNoBackslashEscapesSet()
Is the server in a sql_mode that doesn't allow us to use \\ to escape things? |
boolean |
isSameResource(Connection c)
Does this connection have the same resource name as the given connection (for XA)? |
boolean |
lowerCaseTableNames()
Is the server configured to use lower-case table names only? |
boolean |
parserKnowsUnicode()
Does the server this connection is connected to support unicode? |
void |
ping()
Detect if the connection is still good by sending a ping command to the server. |
void |
reportQueryTime(long millisOrNanos)
|
void |
resetServerState()
Resets the server-side state of this connection. |
java.sql.PreparedStatement |
serverPrepareStatement(java.lang.String sql)
Prepares a statement on the server (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types. |
java.sql.PreparedStatement |
serverPrepareStatement(java.lang.String sql,
int autoGenKeyIndex)
Prepares a statement on the server (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types. |
java.sql.PreparedStatement |
serverPrepareStatement(java.lang.String sql,
int[] autoGenKeyIndexes)
Prepares a statement on the server (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types. |
java.sql.PreparedStatement |
serverPrepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
Prepares a statement on the server (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types. |
java.sql.PreparedStatement |
serverPrepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
Prepares a statement on the server (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types. |
java.sql.PreparedStatement |
serverPrepareStatement(java.lang.String sql,
java.lang.String[] autoGenKeyColNames)
Prepares a statement on the server (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types. |
void |
setFailedOver(boolean flag)
|
void |
setInGlobalTx(boolean flag)
Set the state of being in a global (XA) transaction. |
void |
setPreferSlaveDuringFailover(boolean flag)
|
void |
setStatementComment(java.lang.String comment)
Sets the comment that will be prepended to all statements sent to the server. |
void |
shutdownServer()
Used by MiniAdmin to shutdown a MySQL server |
boolean |
supportsIsolationLevel()
Does the server this connection is connected to support quoted isolation levels? |
boolean |
supportsQuotedIdentifiers()
Does the server this connection is connected to support quoted identifiers? |
boolean |
supportsTransactions()
Does the server this connection is connected to support quoted identifiers? |
boolean |
versionMeetsMinimum(int major,
int minor,
int subminor)
Does the server this connection is connected to meet or exceed the given version? |
| Methods inherited from interface java.sql.Connection |
|---|
clearWarnings, close, commit, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getHoldability, getMetaData, getTransactionIsolation, getTypeMap, getWarnings, isClosed, isReadOnly, isValid, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, rollback, setAutoCommit, setCatalog, setClientInfo, setClientInfo, setHoldability, setReadOnly, setSavepoint, setSavepoint, setTransactionIsolation, setTypeMap |
| Methods inherited from interface java.sql.Wrapper |
|---|
isWrapperFor, unwrap |
| Method Detail |
|---|
void changeUser(java.lang.String userName,
java.lang.String newPassword)
throws java.sql.SQLException
userName - the username to authenticate withnewPassword - the password to authenticate with
java.sql.SQLException - if authentication fails, or some other error occurs while
performing the command.void clearHasTriedMaster()
java.sql.PreparedStatement clientPrepareStatement(java.lang.String sql)
throws java.sql.SQLException
java.sql.SQLExceptionConnection.prepareStatement(String)
java.sql.PreparedStatement clientPrepareStatement(java.lang.String sql,
int autoGenKeyIndex)
throws java.sql.SQLException
java.sql.SQLExceptionConnection.prepareStatement(String, int)
java.sql.PreparedStatement clientPrepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
java.sql.SQLExceptionConnection.prepareStatement(String, int, int)
java.sql.PreparedStatement clientPrepareStatement(java.lang.String sql,
int[] autoGenKeyIndexes)
throws java.sql.SQLException
java.sql.SQLExceptionConnection.prepareStatement(String, int[])
java.sql.PreparedStatement clientPrepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws java.sql.SQLException
java.sql.SQLExceptionConnection.prepareStatement(String, int, int, int)
java.sql.PreparedStatement clientPrepareStatement(java.lang.String sql,
java.lang.String[] autoGenKeyColNames)
throws java.sql.SQLException
java.sql.SQLExceptionConnection.prepareStatement(String, String[])int getActiveStatementCount()
long getIdleFor()
Log getLog()
throws java.sql.SQLException
java.sql.SQLException - if an error occursjava.lang.String getServerCharacterEncoding()
java.util.TimeZone getServerTimezoneTZ()
java.lang.String getStatementComment()
boolean hasTriedMaster()
boolean isInGlobalTx()
void setInGlobalTx(boolean flag)
flag - boolean isMasterConnection()
boolean isNoBackslashEscapesSet()
boolean isSameResource(Connection c)
c -
boolean lowerCaseTableNames()
boolean parserKnowsUnicode()
void ping()
throws java.sql.SQLException
java.sql.SQLException - if the ping fails
void resetServerState()
throws java.sql.SQLException
java.sql.SQLException - if the operation fails while resetting server state.
java.sql.PreparedStatement serverPrepareStatement(java.lang.String sql)
throws java.sql.SQLException
java.sql.SQLExceptionConnection.prepareStatement(String)
java.sql.PreparedStatement serverPrepareStatement(java.lang.String sql,
int autoGenKeyIndex)
throws java.sql.SQLException
java.sql.SQLExceptionConnection.prepareStatement(String, int)
java.sql.PreparedStatement serverPrepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
java.sql.SQLExceptionConnection.prepareStatement(String, int, int)
java.sql.PreparedStatement serverPrepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws java.sql.SQLException
java.sql.SQLExceptionConnection.prepareStatement(String, int, int, int)
java.sql.PreparedStatement serverPrepareStatement(java.lang.String sql,
int[] autoGenKeyIndexes)
throws java.sql.SQLException
java.sql.SQLExceptionConnection.prepareStatement(String, int[])
java.sql.PreparedStatement serverPrepareStatement(java.lang.String sql,
java.lang.String[] autoGenKeyColNames)
throws java.sql.SQLException
java.sql.SQLExceptionConnection.prepareStatement(String, String[])void setFailedOver(boolean flag)
failedOver - The failedOver to set.void setPreferSlaveDuringFailover(boolean flag)
preferSlaveDuringFailover - The preferSlaveDuringFailover to set.void setStatementComment(java.lang.String comment)
comment - the comment that will be prepended to all statements
sent to the server.
void shutdownServer()
throws java.sql.SQLException
java.sql.SQLException - if the command can not be issued.boolean supportsIsolationLevel()
boolean supportsQuotedIdentifiers()
boolean supportsTransactions()
boolean versionMeetsMinimum(int major,
int minor,
int subminor)
throws java.sql.SQLException
java.sql.SQLExceptionvoid reportQueryTime(long millisOrNanos)
boolean isAbonormallyLongQuery(long millisOrNanos)
void initializeExtension(Extension ex)
throws java.sql.SQLException
java.sql.SQLException
|
MySQL Connector/J size='-1'>5.1.6 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||