Deprecated
as a consequence of DefaultConnection being deprecated. See corresponding docs for further information.
This connection buffers consecutive identical prepared statements for
DELETE, INSERT, MERGE,
UPDATE statements, instead of allowing for them to be executed
directly.
Calls to PreparedStatement#executeUpdate() or
PreparedStatement#execute() are replaced by
PreparedStatement#addBatch(). The update count of such operations is
always zero, and cannot be retrieved later on. When any of the following
events happen, the batch is executed using Statement#executeBatch():
BatchedConnection#close method is called (the call is not
delegated to the wrapped connection).Connection#prepareStatement(String) call is made with a
different SQL string.commit().| Modifier and Type | Field and Description |
|---|---|
| pack-priv final int | |
| pack-priv String | |
| pack-priv BatchedPreparedStatement | lastStatement
Deprecated
as a consequence of
BatchedPreparedStatement being deprecated.
|
| pack-priv static final Pattern |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| public void | clearWarnings()
Overrides org. Implements java. Connection object.
|
| public void | close()
Overrides org. Implements java. Connection object's database and JDBC resources
immediately instead of waiting for them to be automatically released.
|
| public void | commit()
Overrides org. Implements java. Connection object.
|
| public Statement | createStatement()
Overrides org. Implements java. Statement object for sending
SQL statements to the database.
|
| public Statement | createStatement(int
a result set type; one of
resultSetType, int ResultSet.TYPE_FORWARD_ONLY,
ResultSet.TYPE_SCROLL_INSENSITIVE, or
ResultSet.TYPE_SCROLL_SENSITIVEa concurrency type; one of
resultSetConcurrency)ResultSet.CONCUR_READ_ONLY or
ResultSet.CONCUR_UPDATABLEOverrides org. Implements java. Statement object that will generate
ResultSet objects with the given type and concurrency.
|
| public Statement | createStatement(int
one of the following resultSetType, int ResultSet
constants:
ResultSet.TYPE_FORWARD_ONLY,
ResultSet.TYPE_SCROLL_INSENSITIVE, or
ResultSet.TYPE_SCROLL_SENSITIVEone of the following resultSetConcurrency, int ResultSet
constants:
ResultSet.CONCUR_READ_ONLY or
ResultSet.CONCUR_UPDATABLEone of the following resultSetHoldability)ResultSet
constants:
ResultSet.HOLD_CURSORS_OVER_COMMIT or
ResultSet.CLOSE_CURSORS_AT_COMMITOverrides org. Implements java. Statement object that will generate
ResultSet objects with the given type, concurrency,
and holdability.
|
| pack-priv void | |
| pack-priv void | |
| public boolean | getAutoCommit()
Overrides org. Implements java. Connection
object.
|
| public String | getCatalog()
Overrides org. Implements java. Connection object's current catalog name.
|
| public String | getClientInfo(String
The name of the client info property to retrieve name)Overrides org. Implements java. |
| public Properties | getClientInfo()
Overrides org. Implements java. |
| public int | getHoldability()
Overrides org. Implements java. ResultSet objects
created using this Connection object.
|
| public int | getTransactionIsolation()
Overrides org. Implements java. Connection object's current
transaction isolation level.
|
| public Map | getTypeMap()
Overrides org. Implements java. Map object associated with this
Connection object.
|
| public SQLWarning | getWarnings()
Overrides org. Implements java. Connection object.
|
| public boolean | isReadOnly()
Overrides org. Implements java. Connection
object is in read-only mode.
|
| public boolean | isValid(int
The time in seconds to wait for the database operation
used to validate the connection to complete. If the
timeout period expires before the operationcompletes,
this method returns false. A value of 0 indicates a
timeout is not applied to the database operation. timeout)Overrides org. Implements java. |
| public boolean | isWrapperFor(Class<?>
a Class defining an interface. iface)Overrides org. Implements java. |
| public CallableStatement | prepareCall(String
an SQL statement that may contain one or more '?'
parameter placeholders. Typically this statement is specified using JDBC
call escape syntax. sql)Overrides org. Implements java. CallableStatement object for calling
database stored procedures.
|
| public CallableStatement | prepareCall(String
a sql, int String object that is the SQL statement to
be sent to the database; may contain on or more '?' parametersa result set type; one of
resultSetType, int ResultSet.TYPE_FORWARD_ONLY,
ResultSet.TYPE_SCROLL_INSENSITIVE, or
ResultSet.TYPE_SCROLL_SENSITIVEa concurrency type; one of
resultSetConcurrency)ResultSet.CONCUR_READ_ONLY or
ResultSet.CONCUR_UPDATABLEOverrides org. Implements java. CallableStatement object that will generate
ResultSet objects with the given type and concurrency.
|
| public CallableStatement | prepareCall(String
a sql, int String object that is the SQL statement to
be sent to the database; may contain on or more '?' parametersone of the following resultSetType, int ResultSet
constants:
ResultSet.TYPE_FORWARD_ONLY,
ResultSet.TYPE_SCROLL_INSENSITIVE, or
ResultSet.TYPE_SCROLL_SENSITIVEone of the following resultSetConcurrency, int ResultSet
constants:
ResultSet.CONCUR_READ_ONLY or
ResultSet.CONCUR_UPDATABLEone of the following resultSetHoldability)ResultSet
constants:
ResultSet.HOLD_CURSORS_OVER_COMMIT or
ResultSet.CLOSE_CURSORS_AT_COMMITOverrides org. Implements java. CallableStatement object that will generate
ResultSet objects with the given type and concurrency.
|
| public PreparedStatement | prepareStatement(String
a sql, int String object that is the SQL statement to
be sent to the database; may contain one or more '?' IN
parametersa result set type; one of
resultSetType, int ResultSet.TYPE_FORWARD_ONLY,
ResultSet.TYPE_SCROLL_INSENSITIVE, or
ResultSet.TYPE_SCROLL_SENSITIVEa concurrency type; one of
resultSetConcurrency)ResultSet.CONCUR_READ_ONLY or
ResultSet.CONCUR_UPDATABLEOverrides org. Implements java. PreparedStatement object that will generate
ResultSet objects with the given type and concurrency.
|
| public PreparedStatement | prepareStatement(String
a sql, int String object that is the SQL statement to
be sent to the database; may contain one or more '?' IN
parametersone of the following resultSetType, int ResultSet
constants:
ResultSet.TYPE_FORWARD_ONLY,
ResultSet.TYPE_SCROLL_INSENSITIVE, or
ResultSet.TYPE_SCROLL_SENSITIVEone of the following resultSetConcurrency, int ResultSet
constants:
ResultSet.CONCUR_READ_ONLY or
ResultSet.CONCUR_UPDATABLEone of the following resultSetHoldability)ResultSet
constants:
ResultSet.HOLD_CURSORS_OVER_COMMIT or
ResultSet.CLOSE_CURSORS_AT_COMMITOverrides org. Implements java. PreparedStatement object that will generate
ResultSet objects with the given type, concurrency,
and holdability.
|
| public PreparedStatement | prepareStatement(String
an SQL statement that may contain one or more '?' IN
parameter placeholders sql, int a flag indicating whether auto-generated keys
should be returned; one of
autoGeneratedKeys)Statement.RETURN_GENERATED_KEYS or
Statement.NO_GENERATED_KEYSOverrides org. Implements java. PreparedStatement object that has
the capability to retrieve auto-generated keys.
|
| public PreparedStatement | prepareStatement(String
an SQL statement that may contain one or more '?' IN
parameter placeholders sql, int[] an array of column indexes indicating the columns
that should be returned from the inserted row or rows columnIndexes)Overrides org. Implements java. PreparedStatement object capable
of returning the auto-generated keys designated by the given array.
|
| public PreparedStatement | prepareStatement(String
an SQL statement that may contain one or more '?' IN
parameter placeholders sql, String[] an array of column names indicating the columns
that should be returned from the inserted row or rows columnNames)Overrides org. Implements java. PreparedStatement object capable
of returning the auto-generated keys designated by the given array.
|
| public PreparedStatement | prepareStatement(String
an SQL statement that may contain one or more '?' IN
parameter placeholders sql)Overrides org. Implements java. PreparedStatement object for sending
parameterized SQL statements to the database.
|
| private PreparedStatement | |
| public void | releaseSavepoint(Savepoint
the savepoint)Savepoint object to be removedOverrides org. Implements java. Savepoint and subsequent Savepoint objects from the current
transaction.
|
| public void | rollback()
Overrides org. Implements java. Connection object.
|
| public void | rollback(Savepoint
the savepoint)Savepoint object to roll back toOverrides org. Implements java. Savepoint object
was set.
|
| public void | setAutoCommit(boolean
true to enable auto-commit mode;
false to disable itOverrides org. Implements java. |
| pack-priv void | setBatch(BatchedPreparedStatement s)
Deprecated
as a consequence of
BatchedPreparedStatement being deprecated.
|
| public void | setCatalog(String
the name of a catalog (subspace in this
catalog)Connection object's database) in which to workOverrides org. Implements java. Connection object's database
in which to work.
|
| public void | setClientInfo(String
The name of the client info property to set name, String The value to set the client info property to. If the
value is null, the current value of the specified
property is cleared. value)Overrides org. Implements java. |
| public void | setClientInfo(Properties
the list of client info properties to set properties)Overrides org. Implements java. |
| public void | setHoldability(int
a holdability)ResultSet holdability constant; one of
ResultSet.HOLD_CURSORS_OVER_COMMIT or
ResultSet.CLOSE_CURSORS_AT_COMMITOverrides org. Implements java. ResultSet objects
created using this Connection object to the given
holdability.
|
| public void | setReadOnly(boolean
true enables read-only mode;
false disables itOverrides org. Implements java. |
| public Savepoint | setSavepoint()
Overrides org. Implements java. Savepoint object that represents it.
|
| public Savepoint | setSavepoint(String
a name)String containing the name of the savepointOverrides org. Implements java. Savepoint object that represents it.
|
| public void | setTransactionIsolation(int
one of the following level)Connection constants:
Connection.TRANSACTION_READ_UNCOMMITTED,
Connection.TRANSACTION_READ_COMMITTED,
Connection.TRANSACTION_REPEATABLE_READ, or
Connection.TRANSACTION_SERIALIZABLE.
(Note that Connection.TRANSACTION_NONE cannot be used
because it specifies that transactions are not supported.)Overrides org. Implements java. Connection object to the one given.
|
| public void | setTypeMap(Map<String, Class<?>>
the map)java.util.Map object to install
as the replacement for this Connection
object's default type mapOverrides org. Implements java. TypeMap object as the type map for
this Connection object.
|
| public <T> T | unwrap(Class<T>
A Class defining an interface that the result must implement. iface)Overrides org. Implements java. |