Java java.sql Connection fields, constructors, methods, implement or subclass

Example usage for Java java.sql Connection fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.sql Connection.

The text is from its open source code.

Implementation

java.sql.Connection has the following implementations.
Click this link to see all its implementation.

Field

intTRANSACTION_NONE
A constant indicating that transactions are not supported.
intTRANSACTION_READ_UNCOMMITTED
A constant indicating that dirty reads, non-repeatable reads and phantom reads can occur.
intTRANSACTION_READ_COMMITTED
A constant indicating that dirty reads are prevented; non-repeatable reads and phantom reads can occur.
intTRANSACTION_REPEATABLE_READ
A constant indicating that dirty reads and non-repeatable reads are prevented; phantom reads can occur.
intTRANSACTION_SERIALIZABLE
A constant indicating that dirty reads, non-repeatable reads and phantom reads are prevented.

Constructor

Method

voidabort(Executor executor)
Terminates an open connection.
voidclearWarnings()
Clears all warnings reported for this Connection object.
voidclose()
Releases this Connection object's database and JDBC resources immediately instead of waiting for them to be automatically released.
voidcommit()
Makes all changes made since the previous commit/rollback permanent and releases any database locks currently held by this Connection object.
ArraycreateArrayOf(String typeName, Object[] elements)
Factory method for creating Array objects.
BlobcreateBlob()
Constructs an object that implements the Blob interface.
ClobcreateClob()
Constructs an object that implements the Clob interface.
NClobcreateNClob()
Constructs an object that implements the NClob interface.
SQLXMLcreateSQLXML()
Constructs an object that implements the SQLXML interface.
StatementcreateStatement(int resultSetType, int resultSetConcurrency)
Creates a Statement object that will generate ResultSet objects with the given type and concurrency.
StatementcreateStatement()
Creates a Statement object for sending SQL statements to the database.
StructcreateStruct(String typeName, Object[] attributes)
Factory method for creating Struct objects.
booleanequals(Object obj)
Indicates whether some other object is "equal to" this one.
booleangetAutoCommit()
Retrieves the current auto-commit mode for this Connection object.
StringgetCatalog()
Retrieves this Connection object's current catalog name.
ClassgetClass()
Returns the runtime class of this Object .
PropertiesgetClientInfo()
Returns a list containing the name and current value of each client info property supported by the driver.
StringgetClientInfo(String name)
Returns the value of the client info property specified by name.
intgetHoldability()
Retrieves the current holdability of ResultSet objects created using this Connection object.
DatabaseMetaDatagetMetaData()
Retrieves a DatabaseMetaData object that contains metadata about the database to which this Connection object represents a connection.
intgetNetworkTimeout()
Retrieves the number of milliseconds the driver will wait for a database request to complete.
StringgetSchema()
Retrieves this Connection object's current schema name.
intgetTransactionIsolation()
Retrieves this Connection object's current transaction isolation level.
java.util.Map>getTypeMap()
Retrieves the Map object associated with this Connection object.
SQLWarninggetWarnings()
Retrieves the first warning reported by calls on this Connection object.
inthashCode()
Returns a hash code value for the object.
booleanisClosed()
Retrieves whether this Connection object has been closed.
booleanisReadOnly()
Retrieves whether this Connection object is in read-only mode.
booleanisValid(int timeout)
Returns true if the connection has not been closed and is still valid.
booleanisWrapperFor(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.
StringnativeSQL(String sql)
Converts the given SQL statement into the system's native SQL grammar.
CallableStatementprepareCall(String sql)
Creates a CallableStatement object for calling database stored procedures.
CallableStatementprepareCall(String sql, int resultSetType, int resultSetConcurrency)
Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency.
PreparedStatementprepareStatement(String sql)
Creates a PreparedStatement object for sending parameterized SQL statements to the database.
PreparedStatementprepareStatement(String sql, int resultSetType, int resultSetConcurrency)
Creates a PreparedStatement object that will generate ResultSet objects with the given type and concurrency.
PreparedStatementprepareStatement(String sql, int autoGeneratedKeys)
Creates a default PreparedStatement object that has the capability to retrieve auto-generated keys.
PreparedStatementprepareStatement(String sql, int columnIndexes[])
Creates a default PreparedStatement object capable of returning the auto-generated keys designated by the given array.
PreparedStatementprepareStatement(String sql, String columnNames[])
Creates a default PreparedStatement object capable of returning the auto-generated keys designated by the given array.
voidreleaseSavepoint(Savepoint savepoint)
Removes the specified Savepoint and subsequent Savepoint objects from the current transaction.
voidrollback()
Undoes all changes made in the current transaction and releases any database locks currently held by this Connection object.
voidrollback(Savepoint savepoint)
Undoes all changes made after the given Savepoint object was set.
voidsetAutoCommit(boolean autoCommit)
Sets this connection's auto-commit mode to the given state.
voidsetCatalog(String catalog)
Sets the given catalog name in order to select a subspace of this Connection object's database in which to work.
voidsetClientInfo(Properties properties)
Sets the value of the connection's client info properties.
voidsetClientInfo(String name, String value)
Sets the value of the client info property specified by name to the value specified by value.
voidsetHoldability(int holdability)
Changes the default holdability of ResultSet objects created using this Connection object to the given holdability.
voidsetNetworkTimeout(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.
voidsetReadOnly(boolean readOnly)
Puts this connection in read-only mode as a hint to the driver to enable database optimizations.
SavepointsetSavepoint(String name)
Creates a savepoint with the given name in the current transaction and returns the new Savepoint object that represents it.
SavepointsetSavepoint()
Creates an unnamed savepoint in the current transaction and returns the new Savepoint object that represents it.
voidsetSchema(String schema)
Sets the given schema name to access.
voidsetTransactionIsolation(int level)
Attempts to change the transaction isolation level for this Connection object to the one given.
voidsetTypeMap(java.util.Map> map)
Installs the given TypeMap object as the type map for this Connection object.
StringtoString()
Returns a string representation of the object.
Tunwrap(java.lang.Class iface)
Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy.