All Superinterfaces:
AutoCloseable, Wrapper

  • Field Summary

    Fields

    static final int

    A constant indicating that transactions are not supported.

    static final int

    A constant indicating that dirty reads are prevented; non-repeatable reads and phantom reads can occur.

    static final int

    A constant indicating that dirty reads, non-repeatable reads and phantom reads can occur.

    static final int

    A constant indicating that dirty reads and non-repeatable reads are prevented; phantom reads can occur.

    static final int

    A constant indicating that dirty reads, non-repeatable reads and phantom reads are prevented.

  • Method Summary

    void

    Terminates an open connection.

    default void

    Hints to the driver that a request, an independent unit of work, is beginning on this connection.

    void

    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.

    Factory method for creating Array objects.

    Constructs an object that implements the Blob interface.

    Constructs an object that implements the Clob interface.

    Constructs an object that implements the NClob interface.

    Constructs an object that implements the SQLXML interface.

    Creates a Statement object for sending SQL statements to the database.

    createStatement(int resultSetType, int resultSetConcurrency)

    Creates a Statement object that will generate ResultSet objects with the given type and concurrency.

    createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability)

    Creates a Statement object that will generate ResultSet objects with the given type, concurrency, and holdability.

    Factory method for creating Struct objects.

    default void

    Hints to the driver that a request, an independent unit of work, has completed.

    boolean

    Retrieves the current auto-commit mode for this Connection object.

    Retrieves this Connection object's current catalog name.

    Returns a list containing the name and current value of each client info property supported by the driver.

    Returns the value of the client info property specified by name.

    int

    Retrieves the current holdability of ResultSet objects created using this Connection object.

    Retrieves a DatabaseMetaData object that contains metadata about the database to which this Connection object represents a connection.

    int

    Retrieves the number of milliseconds the driver will wait for a database request to complete.

    getSchema()

    Retrieves this Connection object's current schema name.

    int

    Retrieves this Connection object's current transaction isolation level.

    Retrieves the Map object associated with this Connection object.

    Retrieves the first warning reported by calls on this Connection object.

    boolean

    isClosed()

    Retrieves whether this Connection object has been closed.

    boolean

    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.

    Converts the given SQL statement into the system's native SQL grammar.

    Creates a CallableStatement object for calling database stored procedures.

    prepareCall(String sql, int resultSetType, int resultSetConcurrency)

    Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency.

    prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)

    Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency.

    Creates a PreparedStatement object for sending parameterized SQL statements to the database.

    prepareStatement(String sql, int autoGeneratedKeys)

    Creates a default PreparedStatement object that has the capability to retrieve auto-generated keys.

    prepareStatement(String sql, int[] columnIndexes)

    Creates a default PreparedStatement object capable of returning the auto-generated keys designated by the given array.

    prepareStatement(String sql, int resultSetType, int resultSetConcurrency)

    Creates a PreparedStatement object that will generate ResultSet objects with the given type and concurrency.

    prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)

    Creates a PreparedStatement object that will generate ResultSet objects with the given type, concurrency, and holdability.

    Creates a default PreparedStatement object capable of returning the auto-generated keys designated by the given array.

    void

    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

    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

    Sets the given catalog name in order to select a subspace of this Connection object's database in which to work.

    void

    Sets the value of the client info property specified by name to the value specified by value.

    void

    Sets the value of the connection's client info properties.

    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.

    Creates an unnamed savepoint in the current transaction and returns the new Savepoint object that represents it.

    Creates a savepoint with the given name in the current transaction and returns the new Savepoint object that represents it.

    void

    Sets the given schema name to access.

    default void

    Specifies a shardingKey to use with this Connection

    default void

    Specifies a shardingKey and superShardingKey to use with this Connection

    default boolean

    Sets and validates the sharding key for this connection.

    default boolean

    Sets and validates the sharding keys for this connection.

    void

    setTransactionIsolation(int level)

    Attempts to change the transaction isolation level for this Connection object to the one given.

    void

    Installs the given TypeMap object as the type map for this Connection object.

  • Field Details

    • TRANSACTION_NONE

    • TRANSACTION_READ_UNCOMMITTED

    • TRANSACTION_READ_COMMITTED

    • TRANSACTION_REPEATABLE_READ

    • TRANSACTION_SERIALIZABLE

  • Method Details

    • createStatement

    • prepareStatement

    • prepareCall

    • nativeSQL

    • setAutoCommit

    • getAutoCommit

    • commit

    • rollback

    • close

    • isClosed

    • getMetaData

    • setReadOnly

    • isReadOnly

    • setCatalog

    • getCatalog

    • setTransactionIsolation

    • getTransactionIsolation

    • getWarnings

    • clearWarnings

    • createStatement

    • prepareStatement

    • prepareCall

    • getTypeMap

    • setTypeMap

    • setHoldability

    • getHoldability

    • setSavepoint

    • setSavepoint

    • rollback

    • releaseSavepoint

    • createStatement

    • prepareStatement

    • prepareCall

    • prepareStatement

    • prepareStatement

    • prepareStatement

    • createClob

    • createBlob

    • createNClob

    • createSQLXML

    • isValid

    • setClientInfo

    • setClientInfo

    • getClientInfo

    • getClientInfo

    • createArrayOf

    • createStruct

    • setSchema

    • getSchema

    • abort

    • setNetworkTimeout

    • getNetworkTimeout

    • beginRequest

    • endRequest

    • setShardingKeyIfValid

    • setShardingKeyIfValid

    • setShardingKey

    • setShardingKey