Example usage for Java java.sql Connection fields, constructors, methods, implement or subclass
The text is from its open source code.
int | TRANSACTION_NONE A constant indicating that transactions are not supported. |
int | TRANSACTION_READ_UNCOMMITTED A constant indicating that dirty reads, non-repeatable reads and phantom reads can occur. |
int | TRANSACTION_READ_COMMITTED A constant indicating that dirty reads are prevented; non-repeatable reads and phantom reads can occur. |
int | TRANSACTION_REPEATABLE_READ A constant indicating that dirty reads and non-repeatable reads are prevented; phantom reads can occur. |
int | TRANSACTION_SERIALIZABLE A constant indicating that dirty reads, non-repeatable reads and phantom reads are prevented. |
void | abort(Executor executor) Terminates an open connection. |
void | clearWarnings() Clears all warnings reported for this Connection object. |
void | close() Releases this Connection object's database and JDBC resources immediately instead of waiting for them to be automatically released. |
void | commit() Makes all changes made since the previous commit/rollback permanent and releases any database locks currently held by this Connection object. |
Array | createArrayOf(String typeName, Object[] elements) Factory method for creating Array objects. |
Blob | createBlob() Constructs an object that implements the Blob interface. |
Clob | createClob() Constructs an object that implements the Clob interface. |
NClob | createNClob() Constructs an object that implements the NClob interface. |
SQLXML | createSQLXML() Constructs an object that implements the SQLXML interface. |
Statement | createStatement(int resultSetType, int resultSetConcurrency) Creates a Statement object that will generate ResultSet objects with the given type and concurrency. |
Statement | createStatement() Creates a Statement object for sending SQL statements to the database. |
Struct | createStruct(String typeName, Object[] attributes) Factory method for creating Struct objects. |
boolean | equals(Object obj) Indicates whether some other object is "equal to" this one. |
boolean | getAutoCommit() Retrieves the current auto-commit mode for this Connection object. |
String | getCatalog() Retrieves this Connection object's current catalog name. |
Class> | getClass() Returns the runtime class of this Object . |
Properties | getClientInfo() Returns a list containing the name and current value of each client info property supported by the driver. |
String | getClientInfo(String name) Returns the value of the client info property specified by name. |
int | getHoldability() Retrieves the current holdability of ResultSet objects created using this Connection object. |
DatabaseMetaData | getMetaData() Retrieves a DatabaseMetaData object that contains metadata about the database to which this Connection object represents a connection. |
int | getNetworkTimeout() Retrieves the number of milliseconds the driver will wait for a database request to complete. |
String | getSchema() Retrieves this Connection object's current schema name. |
int | getTransactionIsolation() Retrieves this Connection object's current transaction isolation level. |
java.util.Map | getTypeMap() Retrieves the Map object associated with this Connection object. |
SQLWarning | getWarnings() Retrieves the first warning reported by calls on this Connection object. |
int | hashCode() Returns a hash code value for the object. |
boolean | isClosed() Retrieves whether this Connection object has been closed. |
boolean | isReadOnly() Retrieves whether this Connection object is in read-only mode. |
boolean | isValid(int timeout) Returns true if the connection has not been closed and is still valid. |
boolean | isWrapperFor(java.lang.Class> iface) Returns true if this either implements the interface argument or is directly or indirectly a wrapper for an object that does. |
String | nativeSQL(String sql) Converts the given SQL statement into the system's native SQL grammar. |
CallableStatement | prepareCall(String sql) Creates a CallableStatement object for calling database stored procedures. |
CallableStatement | prepareCall(String sql, int resultSetType, int resultSetConcurrency) Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency. |
PreparedStatement | prepareStatement(String sql) Creates a PreparedStatement object for sending parameterized SQL statements to the database. |
PreparedStatement | prepareStatement(String sql, int resultSetType, int resultSetConcurrency) Creates a PreparedStatement object that will generate ResultSet objects with the given type and concurrency. |
PreparedStatement | prepareStatement(String sql, int autoGeneratedKeys) Creates a default PreparedStatement object that has the capability to retrieve auto-generated keys. |
PreparedStatement | prepareStatement(String sql, int columnIndexes[]) Creates a default PreparedStatement object capable of returning the auto-generated keys designated by the given array. |
PreparedStatement | prepareStatement(String sql, String columnNames[]) Creates a default PreparedStatement object capable of returning the auto-generated keys designated by the given array. |
void | releaseSavepoint(Savepoint savepoint) Removes the specified Savepoint and subsequent Savepoint objects from the current transaction. |
void | rollback() Undoes all changes made in the current transaction and releases any database locks currently held by this Connection object. |
void | rollback(Savepoint savepoint) Undoes all changes made after the given Savepoint object was set. |
void | setAutoCommit(boolean autoCommit) Sets this connection's auto-commit mode to the given state. |
void | setCatalog(String catalog) Sets the given catalog name in order to select a subspace of this Connection object's database in which to work. |
void | setClientInfo(Properties properties) Sets the value of the connection's client info properties. |
void | setClientInfo(String name, String value) Sets the value of the client info property specified by name to the value specified by value. |
void | setHoldability(int holdability) Changes the default holdability of ResultSet objects created using this Connection object to the given holdability. |
void | setNetworkTimeout(Executor executor, int milliseconds) Sets the maximum period a Connection or objects created from the Connection will wait for the database to reply to any one request. |
void | setReadOnly(boolean readOnly) Puts this connection in read-only mode as a hint to the driver to enable database optimizations. |
Savepoint | setSavepoint(String name) Creates a savepoint with the given name in the current transaction and returns the new Savepoint object that represents it. |
Savepoint | setSavepoint() Creates an unnamed savepoint in the current transaction and returns the new Savepoint object that represents it. |
void | setSchema(String schema) Sets the given schema name to access. |
void | setTransactionIsolation(int level) Attempts to change the transaction isolation level for this Connection object to the one given. |
void | setTypeMap(java.util.Map Installs the given TypeMap object as the type map for this Connection object. |
String | toString() Returns a string representation of the object. |
T | unwrap(java.lang.Class Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy. |