| java.lang.Object org.h2.message.TraceObject org.h2.jdbc.JdbcConnection
JdbcConnection | public class JdbcConnection extends TraceObject implements Connection(Code) | | Represents a connection (session) to a database.
|
Method Summary | |
void | checkClosed() | public void | clearWarnings() Clears all warnings. | public void | close() Closes this connection. | public void | closeConnection() | public synchronized void | commit() Commits the current transaction. | public Blob | createBlob() Create a new empty Blob object. | Value | createBlob(InputStream x, long length) | public Clob | createClob() Create a new empty Clob object. | Value | createClob(Reader x, long length) [Not supported] Checks if unwrap can return an object of this class. | public Statement | createStatement() Creates a new statement. | public Statement | createStatement(int resultSetType, int resultSetConcurrency) Creates a statement with the specified result set type and concurrency. | public Statement | createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) Creates a statement with the specified result set type, concurrency, and
holdability. | protected void | finalize() | public synchronized boolean | getAutoCommit() Gets the current setting for auto commit. | public String | getCatalog() Gets the current catalog name. | public String | getClientInfo(String name) [Not supported] Set a client property. | ResultInterface | getGeneratedKeys(JdbcStatement statement, int id) | public int | getHoldability() Returns the current result set holdability. | public DatabaseMetaData | getMetaData() Gets the database meta data for this database. | public int | getPowerOffCount() | public int | getQueryTimeout() | public SessionInterface | getSession() | public int | getTransactionIsolation() Returns the current transaction isolation level. | public Map | getTypeMap() Gets the type map. | String | getURL() | String | getUser() | public SQLWarning | getWarnings() Gets the first warning reported by calls on this object. | public boolean | isClosed() Returns true if this connection has been closed. | public boolean | isReadOnly() Returns true if the database is read-only. | public synchronized boolean | isValid(int timeout) Returns true if this connection is still valid. | public String | nativeSQL(String sql) Translates a SQL statement into the database grammar. | PreparedStatement | prepareAutoCloseStatement(String sql) | public CallableStatement | prepareCall(String sql) Creates a new callable statement. | public CallableStatement | prepareCall(String sql, int resultSetType, int resultSetConcurrency) Creates a callable statement with the specified result set type and
concurrency. | public CallableStatement | prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) Creates a callable statement with the specified result set type,
concurrency, and holdability. | CommandInterface | prepareCommand(String sql, int fetchSize) | CommandInterface | prepareCommand(String sql, CommandInterface old) | public PreparedStatement | prepareStatement(String sql) Creates a new prepared statement. | public PreparedStatement | prepareStatement(String sql, int resultSetType, int resultSetConcurrency) Creates a prepared statement with the specified result set type and
concurrency. | public PreparedStatement | prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) Creates a prepared statement with the specified result set type,
concurrency, and holdability. | public PreparedStatement | prepareStatement(String sql, int autoGeneratedKeys) Creates a new prepared statement. | public PreparedStatement | prepareStatement(String sql, int[] columnIndexes) Creates a new prepared statement. | public PreparedStatement | prepareStatement(String sql, String[] columnNames) Creates a new prepared statement. | public void | releaseSavepoint(Savepoint savepoint) Releases a savepoint. | public synchronized void | rollback() Rolls back the current transaction. | public void | rollback(Savepoint savepoint) Rolls back to a savepoint. | public synchronized void | setAutoCommit(boolean autoCommit) Switches auto commit on or off. | public void | setCatalog(String catalog) Set the default catalog name. | public void | setExecutingStatement(Statement stat) | public void | setHoldability(int holdability) Changes the current result set holdability. | public void | setJdbcConnectionListener(JdbcConnectionListener listener) | public void | setPowerOffCount(int count) | public void | setQueryTimeout(int seconds) | public void | setReadOnly(boolean readOnly) According to the JDBC specs, this
setting is only a hint to the database to enable optimizations - it does
not cause writes to be prohibited. | public Savepoint | setSavepoint() Creates a new unnamed savepoint. | public Savepoint | setSavepoint(String name) Creates a new named savepoint. | public void | setTransactionIsolation(int level) Changes the current transaction isolation level. | public void | setTypeMap(Map map) [Partially supported] Sets the type map. | public String | toString() | String | translateSQL(String sql) |
close | public void close() throws SQLException(Code) | | Closes this connection. All open statements, prepared statements and
result sets that where created by this connection become invalid after
calling this method. If there is an uncommitted transaction, it will be
rolled back.
|
commit | public synchronized void commit() throws SQLException(Code) | | Commits the current transaction. This call has only an effect if
auto commit is switched off.
throws: SQLException - if the connection is closed |
createClob | Value createClob(Reader x, long length) throws SQLException(Code) | | [Not supported] Checks if unwrap can return an object of this class.
Parameters: iface - the class |
createStatement | public Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException(Code) | | Creates a statement with the specified result set type and concurrency.
the statement throws: SQLException - if the connection is closed or the result set type orconcurrency are not supported |
createStatement | public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException(Code) | | Creates a statement with the specified result set type, concurrency, and
holdability.
the statement throws: SQLException - if the connection is closed or the result set type,concurrency, or holdability are not supported |
finalize | protected void finalize()(Code) | | |
getAutoCommit | public synchronized boolean getAutoCommit() throws SQLException(Code) | | Gets the current setting for auto commit.
true for on, false for off throws: SQLException - if the connection is closed |
getHoldability | public int getHoldability() throws SQLException(Code) | | Returns the current result set holdability.
the holdability throws: SQLException - if the connection is closed |
getPowerOffCount | public int getPowerOffCount()(Code) | | INTERNAL
|
getTransactionIsolation | public int getTransactionIsolation() throws SQLException(Code) | | Returns the current transaction isolation level.
the isolation level. throws: SQLException - if the connection is closed |
isClosed | public boolean isClosed() throws SQLException(Code) | | Returns true if this connection has been closed.
true if close was called |
isReadOnly | public boolean isReadOnly() throws SQLException(Code) | | Returns true if the database is read-only.
if the database is read-only throws: SQLException - if the connection is closed |
isValid | public synchronized boolean isValid(int timeout)(Code) | | Returns true if this connection is still valid.
true if the connection is valid. |
prepareCall | public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException(Code) | | Creates a callable statement with the specified result set type and
concurrency.
the callable statement throws: SQLException - if the connection is closed or the result set type orconcurrency are not supported |
prepareCall | public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException(Code) | | Creates a callable statement with the specified result set type,
concurrency, and holdability.
the callable statement throws: SQLException - if the connection is closed or the result set type,concurrency, or holdability are not supported |
prepareStatement | public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException(Code) | | Creates a prepared statement with the specified result set type and
concurrency.
the prepared statement throws: SQLException - if the connection is closed or the result set type orconcurrency are not supported |
prepareStatement | public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException(Code) | | Creates a prepared statement with the specified result set type,
concurrency, and holdability.
the prepared statement throws: SQLException - if the connection is closed or the result set type,concurrency, or holdability are not supported |
prepareStatement | public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException(Code) | | Creates a new prepared statement. This method just calls
prepareStatement(String sql).
the prepared statement throws: SQLException - if the connection is closed |
prepareStatement | public PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException(Code) | | Creates a new prepared statement. This method just calls
prepareStatement(String sql).
the prepared statement throws: SQLException - if the connection is closed |
rollback | public synchronized void rollback() throws SQLException(Code) | | Rolls back the current transaction. This call has only an effect if
auto commit is switched off.
throws: SQLException - if the connection is closed |
setAutoCommit | public synchronized void setAutoCommit(boolean autoCommit) throws SQLException(Code) | | Switches auto commit on or off. Calling this function does not commit the
current transaction.
Parameters: autoCommit - true for auto commit on, false for off throws: SQLException - if the connection is closed |
setExecutingStatement | public void setExecutingStatement(Statement stat)(Code) | | INTERNAL
|
setHoldability | public void setHoldability(int holdability) throws SQLException(Code) | | Changes the current result set holdability.
Parameters: holdability - ResultSet.HOLD_CURSORS_OVER_COMMIT orResultSet.CLOSE_CURSORS_AT_COMMIT; throws: SQLException - if the connection is closed or the holdability is notsupported |
setPowerOffCount | public void setPowerOffCount(int count) throws SQLException(Code) | | INTERNAL
|
setQueryTimeout | public void setQueryTimeout(int seconds) throws SQLException(Code) | | INTERNAL
|
setReadOnly | public void setReadOnly(boolean readOnly) throws SQLException(Code) | | According to the JDBC specs, this
setting is only a hint to the database to enable optimizations - it does
not cause writes to be prohibited.
throws: SQLException - if the connection is closed |
setTransactionIsolation | public void setTransactionIsolation(int level) throws SQLException(Code) | | Changes the current transaction isolation level. Calling this method will
commit an open transaction, even if the new level is the same as the old
one, except if the level is not supported.
Parameters: level - the new transaction isolation level,Connection.TRANSACTION_READ_UNCOMMITTED,Connection.TRANSACTION_READ_COMMITTED, orConnection.TRANSACTION_SERIALIZABLE throws: SQLException - if the connection is closed or the isolation levelis not supported |
setTypeMap | public void setTypeMap(Map map) throws SQLException(Code) | | [Partially supported] Sets the type map. This is only supported if the
map is empty or null.
|
Fields inherited from org.h2.message.TraceObject | final public static int CALLABLE_STATEMENTCONNECTIONDATABASE_META_DATAPREPARED_STATEMENTRESULT_SETRESULT_SET_META_DATASAVEPOINTSQL_EXCEPTIONSTATEMENTBLOBCLOBPARAMETER_META_DATA(Code)(Java Doc) final public static int DATA_SOURCEXA_DATA_SOURCEXIDARRAY(Code)(Java Doc)
|
|
|