| java.lang.Object org.postgresql.jdbc2.AbstractJdbc2Connection org.postgresql.jdbc3.AbstractJdbc3Connection
All known Subclasses: org.postgresql.jdbc3.Jdbc3Connection, org.postgresql.jdbc3g.Jdbc3gConnection, org.postgresql.jdbc4.AbstractJdbc4Connection,
AbstractJdbc3Connection | abstract public class AbstractJdbc3Connection extends org.postgresql.jdbc2.AbstractJdbc2Connection (Code) | | This class defines methods of the jdbc3 specification. This class extends
org.postgresql.jdbc2.AbstractJdbc2Connection which provides the jdbc2
methods. The real Connection class (for jdbc3) is org.postgresql.jdbc3.Jdbc3Connection
|
Method Summary | |
abstract public Statement | createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) Creates a Statement object that will generate
ResultSet objects with the given type, concurrency,
and holdability. | public Statement | createStatement(int resultSetType, int resultSetConcurrency) | public int | getHoldability() Retrieves the current holdability of ResultSet objects
created using this Connection object. | abstract public CallableStatement | prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) Creates a CallableStatement object that will generate
ResultSet objects with the given type and concurrency. | public CallableStatement | prepareCall(String sql, int resultSetType, int resultSetConcurrency) | abstract public PreparedStatement | 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. | public PreparedStatement | prepareStatement(String sql, int resultSetType, int resultSetConcurrency) | public PreparedStatement | prepareStatement(String sql, int autoGeneratedKeys) Creates a default PreparedStatement object that has
the capability to retrieve auto-generated keys. | public PreparedStatement | prepareStatement(String sql, int columnIndexes) Creates a default PreparedStatement object capable
of returning the auto-generated keys designated by the given array.
This array contains the indexes of the columns in the target
table that contain the auto-generated keys that should be made
available. | public PreparedStatement | prepareStatement(String sql, String columnNames) Creates a default PreparedStatement object capable
of returning the auto-generated keys designated by the given array.
This array contains the names of the columns in the target
table that contain the auto-generated keys that should be returned.
This array is ignored if the SQL
statement is not an INSERT statement.
An SQL statement with or without IN parameters can be
pre-compiled and stored in a PreparedStatement object. | public void | releaseSavepoint(Savepoint savepoint) Removes the given Savepoint object from the current
transaction. | public void | rollback(Savepoint savepoint) Undoes all changes made after the given Savepoint object
was set. | public void | setHoldability(int holdability) Changes the holdability of ResultSet objects
created using this Connection object to the given
holdability. | public Savepoint | setSavepoint() Creates an unnamed savepoint in the current transaction and
returns the new Savepoint object that represents it. | public Savepoint | setSavepoint(String name) Creates a savepoint with the given name in the current transaction
and returns the new Savepoint object that represents it. |
createStatement | abstract public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException(Code) | | Creates a Statement object that will generate
ResultSet objects with the given type, concurrency,
and holdability.
This method is the same as the createStatement method
above, but it allows the default result set
type, concurrency, and holdability to be overridden.
Parameters: resultSetType - one of the following ResultSet constants:ResultSet.TYPE_FORWARD_ONLY ,ResultSet.TYPE_SCROLL_INSENSITIVE , orResultSet.TYPE_SCROLL_SENSITIVE Parameters: resultSetConcurrency - one of the following ResultSet constants:ResultSet.CONCUR_READ_ONLY orResultSet.CONCUR_UPDATABLE Parameters: resultSetHoldability - one of the following ResultSet constants:ResultSet.HOLD_CURSORS_OVER_COMMIT orResultSet.CLOSE_CURSORS_AT_COMMIT a new Statement object that will generateResultSet objects with the given type,concurrency, and holdability exception: SQLException - if a database access error occursor the given parameters are not ResultSet constants indicating type, concurrency, and holdability See Also: ResultSet since: 1.4 |
prepareCall | abstract public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException(Code) | | Creates a CallableStatement object that will generate
ResultSet objects with the given type and concurrency.
This method is the same as the prepareCall method
above, but it allows the default result set
type, result set concurrency type and holdability to be overridden.
Parameters: sql - a String object that is the SQL statement tobe sent to the database; may contain on or more ? parameters Parameters: resultSetType - one of the following ResultSet constants:ResultSet.TYPE_FORWARD_ONLY ,ResultSet.TYPE_SCROLL_INSENSITIVE , orResultSet.TYPE_SCROLL_SENSITIVE Parameters: resultSetConcurrency - one of the following ResultSet constants:ResultSet.CONCUR_READ_ONLY orResultSet.CONCUR_UPDATABLE Parameters: resultSetHoldability - one of the following ResultSet constants:ResultSet.HOLD_CURSORS_OVER_COMMIT orResultSet.CLOSE_CURSORS_AT_COMMIT a new CallableStatement object, containing thepre-compiled SQL statement, that will generateResultSet objects with the given type,concurrency, and holdability exception: SQLException - if a database access error occursor the given parameters are not ResultSet constants indicating type, concurrency, and holdability See Also: ResultSet since: 1.4 |
prepareStatement | abstract public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException(Code) | | Creates a PreparedStatement object that will generate
ResultSet objects with the given type, concurrency,
and holdability.
This method is the same as the prepareStatement method
above, but it allows the default result set
type, concurrency, and holdability to be overridden.
Parameters: sql - a String object that is the SQL statement tobe sent to the database; may contain one or more ? INparameters Parameters: resultSetType - one of the following ResultSet constants:ResultSet.TYPE_FORWARD_ONLY ,ResultSet.TYPE_SCROLL_INSENSITIVE , orResultSet.TYPE_SCROLL_SENSITIVE Parameters: resultSetConcurrency - one of the following ResultSet constants:ResultSet.CONCUR_READ_ONLY orResultSet.CONCUR_UPDATABLE Parameters: resultSetHoldability - one of the following ResultSet constants:ResultSet.HOLD_CURSORS_OVER_COMMIT orResultSet.CLOSE_CURSORS_AT_COMMIT a new PreparedStatement object, containing thepre-compiled SQL statement, that will generateResultSet objects with the given type,concurrency, and holdability exception: SQLException - if a database access error occursor the given parameters are not ResultSet constants indicating type, concurrency, and holdability See Also: ResultSet since: 1.4 |
prepareStatement | public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException(Code) | | Creates a default PreparedStatement object that has
the capability to retrieve auto-generated keys. The given constant
tells the driver whether it should make auto-generated keys
available for retrieval. This parameter is ignored if the SQL
statement is not an INSERT statement.
Note: This method is optimized for handling
parametric SQL statements that benefit from precompilation. If
the driver supports precompilation,
the method prepareStatement will send
the statement to the database for precompilation. Some drivers
may not support precompilation. In this case, the statement may
not be sent to the database until the PreparedStatement
object is executed. This has no direct effect on users; however, it does
affect which methods throw certain SQLExceptions.
Result sets created using the returned PreparedStatement
object will by default be type TYPE_FORWARD_ONLY
and have a concurrency level of CONCUR_READ_ONLY .
Parameters: sql - an SQL statement that may contain one or more '?' INparameter placeholders Parameters: autoGeneratedKeys - a flag indicating whether auto-generated keysshould be returned; one of the following Statement constants:Statement.RETURN_GENERATED_KEYS orStatement.NO_GENERATED_KEYS . a new PreparedStatement object, containing thepre-compiled SQL statement, that will have the capability ofreturning auto-generated keys exception: SQLException - if a database access error occursor the given parameter is not a Statement constant indicating whether auto-generated keys should bereturned since: 1.4 |
prepareStatement | public PreparedStatement prepareStatement(String sql, int columnIndexes) throws SQLException(Code) | | Creates a default PreparedStatement object capable
of returning the auto-generated keys designated by the given array.
This array contains the indexes of the columns in the target
table that contain the auto-generated keys that should be made
available. This array is ignored if the SQL
statement is not an INSERT statement.
An SQL statement with or without IN parameters can be
pre-compiled and stored in a PreparedStatement object. This
object can then be used to efficiently execute this statement
multiple times.
Note: This method is optimized for handling
parametric SQL statements that benefit from precompilation. If
the driver supports precompilation,
the method prepareStatement will send
the statement to the database for precompilation. Some drivers
may not support precompilation. In this case, the statement may
not be sent to the database until the PreparedStatement
object is executed. This has no direct effect on users; however, it does
affect which methods throw certain SQLExceptions.
Result sets created using the returned PreparedStatement
object will by default be type TYPE_FORWARD_ONLY
and have a concurrency level of CONCUR_READ_ONLY .
Parameters: sql - an SQL statement that may contain one or more '?' INparameter placeholders Parameters: columnIndexes - an array of column indexes indicating the columnsthat should be returned from the inserted row or rows a new PreparedStatement object, containing thepre-compiled statement, that is capable of returning theauto-generated keys designated by the given array of columnindexes exception: SQLException - if a database access error occurs since: 1.4 |
prepareStatement | public PreparedStatement prepareStatement(String sql, String columnNames) throws SQLException(Code) | | Creates a default PreparedStatement object capable
of returning the auto-generated keys designated by the given array.
This array contains the names of the columns in the target
table that contain the auto-generated keys that should be returned.
This array is ignored if the SQL
statement is not an INSERT statement.
An SQL statement with or without IN parameters can be
pre-compiled and stored in a PreparedStatement object. This
object can then be used to efficiently execute this statement
multiple times.
Note: This method is optimized for handling
parametric SQL statements that benefit from precompilation. If
the driver supports precompilation,
the method prepareStatement will send
the statement to the database for precompilation. Some drivers
may not support precompilation. In this case, the statement may
not be sent to the database until the PreparedStatement
object is executed. This has no direct effect on users; however, it does
affect which methods throw certain SQLExceptions.
Result sets created using the returned PreparedStatement
object will by default be type TYPE_FORWARD_ONLY
and have a concurrency level of CONCUR_READ_ONLY .
Parameters: sql - an SQL statement that may contain one or more '?' INparameter placeholders Parameters: columnNames - an array of column names indicating the columnsthat should be returned from the inserted row or rows a new PreparedStatement object, containing thepre-compiled statement, that is capable of returning theauto-generated keys designated by the given array of columnnames exception: SQLException - if a database access error occurs since: 1.4 |
releaseSavepoint | public void releaseSavepoint(Savepoint savepoint) throws SQLException(Code) | | Removes the given Savepoint object from the current
transaction. Any reference to the savepoint after it have been removed
will cause an SQLException to be thrown.
Parameters: savepoint - the Savepoint object to be removed exception: SQLException - if a database access error occurs orthe given Savepoint object is not a validsavepoint in the current transaction since: 1.4 |
rollback | public void rollback(Savepoint savepoint) throws SQLException(Code) | | Undoes all changes made after the given Savepoint object
was set.
This method should be used only when auto-commit has been disabled.
Parameters: savepoint - the Savepoint object to roll back to exception: SQLException - if a database access error occurs,the Savepoint object is no longer valid,or this Connection object is currently inauto-commit mode See Also: Savepoint See Also: AbstractJdbc3Connection.rollback since: 1.4 |
setHoldability | public void setHoldability(int holdability) throws SQLException(Code) | | Changes the holdability of ResultSet objects
created using this Connection object to the given
holdability.
Parameters: holdability - a ResultSet holdability constant; one ofResultSet.HOLD_CURSORS_OVER_COMMIT orResultSet.CLOSE_CURSORS_AT_COMMIT throws: SQLException - if a database access occurs, the given parameteris not a ResultSet constant indicating holdability,or the given holdability is not supported See Also: AbstractJdbc3Connection.getHoldability See Also: ResultSet since: 1.4 |
setSavepoint | public Savepoint setSavepoint() throws SQLException(Code) | | Creates an unnamed savepoint in the current transaction and
returns the new Savepoint object that represents it.
the new Savepoint object exception: SQLException - if a database access error occursor this Connection object is currently inauto-commit mode See Also: Savepoint since: 1.4 |
setSavepoint | public Savepoint setSavepoint(String name) throws SQLException(Code) | | Creates a savepoint with the given name in the current transaction
and returns the new Savepoint object that represents it.
Parameters: name - a String containing the name of the savepoint the new Savepoint object exception: SQLException - if a database access error occursor this Connection object is currently inauto-commit mode See Also: Savepoint since: 1.4 |
Methods inherited from org.postgresql.jdbc2.AbstractJdbc2Connection | public void addDataType(String type, String name)(Code)(Java Doc) public void addDataType(String type, Class klass) throws SQLException(Code)(Java Doc) public void addWarning(SQLWarning warn)(Code)(Java Doc) public void cancelQuery() throws SQLException(Code)(Java Doc) public synchronized void clearWarnings() throws SQLException(Code)(Java Doc) public void close()(Code)(Java Doc) public void commit() throws SQLException(Code)(Java Doc) public java.sql.Statement createStatement() throws SQLException(Code)(Java Doc) abstract public java.sql.Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException(Code)(Java Doc) protected void enableDriverManagerLogging()(Code)(Java Doc) public byte[] encodeString(String str) throws SQLException(Code)(Java Doc) public String escapeString(String str) throws SQLException(Code)(Java Doc) public ResultSet execSQLQuery(String s) throws SQLException(Code)(Java Doc) public ResultSet execSQLQuery(String s, int resultSetType, int resultSetConcurrency) throws SQLException(Code)(Java Doc) public void execSQLUpdate(String s) throws SQLException(Code)(Java Doc) protected void finalize() throws Throwable(Code)(Java Doc) public boolean getAutoCommit()(Code)(Java Doc) public String getCatalog() throws SQLException(Code)(Java Doc) public String getCursorName() throws SQLException(Code)(Java Doc) public String getDBVersionNumber()(Code)(Java Doc) public Encoding getEncoding()(Code)(Java Doc) public Fastpath getFastpathAPI() throws SQLException(Code)(Java Doc) protected String getIsolationLevelName(int level)(Code)(Java Doc) public String getJavaClass(int oid) throws SQLException(Code)(Java Doc) public LargeObjectManager getLargeObjectAPI() throws SQLException(Code)(Java Doc) public Logger getLogger()(Code)(Java Doc) abstract public DatabaseMetaData getMetaData() throws SQLException(Code)(Java Doc) public PGNotification[] getNotifications() throws SQLException(Code)(Java Doc) public Object getObject(String type, String value) throws SQLException(Code)(Java Doc) public int getPGType(String typeName) throws SQLException(Code)(Java Doc) public String getPGType(int oid) throws SQLException(Code)(Java Doc) public Iterator getPGTypeNamesWithSQLTypes()(Code)(Java Doc) public int getPrepareThreshold()(Code)(Java Doc) public int getProtocolVersion()(Code)(Java Doc) public QueryExecutor getQueryExecutor()(Code)(Java Doc) public int getSQLType(int oid) throws SQLException(Code)(Java Doc) public int getSQLType(String pgTypeName)(Code)(Java Doc) public int getServerMajorVersion()(Code)(Java Doc) public int getServerMinorVersion()(Code)(Java Doc) public boolean getStandardConformingStrings()(Code)(Java Doc) public boolean getStringVarcharFlag()(Code)(Java Doc) public TimestampUtils getTimestampUtils()(Code)(Java Doc) public int getTransactionIsolation() throws SQLException(Code)(Java Doc) public java.util.Map getTypeMap() throws SQLException(Code)(Java Doc) public String getURL() throws SQLException(Code)(Java Doc) public String getUserName() throws SQLException(Code)(Java Doc) public synchronized SQLWarning getWarnings() throws SQLException(Code)(Java Doc) public boolean haveMinimumCompatibleVersion(String ver)(Code)(Java Doc) public boolean haveMinimumServerVersion(String ver)(Code)(Java Doc) public boolean isClosed() throws SQLException(Code)(Java Doc) public boolean isReadOnly() throws SQLException(Code)(Java Doc) public String nativeSQL(String sql) throws SQLException(Code)(Java Doc) public java.sql.CallableStatement prepareCall(String sql) throws SQLException(Code)(Java Doc) abstract public java.sql.CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException(Code)(Java Doc) public java.sql.PreparedStatement prepareStatement(String sql) throws SQLException(Code)(Java Doc) abstract public java.sql.PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException(Code)(Java Doc) public void rollback() throws SQLException(Code)(Java Doc) public void setAutoCommit(boolean autoCommit) throws SQLException(Code)(Java Doc) public void setCatalog(String catalog) throws SQLException(Code)(Java Doc) public void setCursorName(String cursor) throws SQLException(Code)(Java Doc) public void setPrepareThreshold(int newThreshold)(Code)(Java Doc) public void setReadOnly(boolean readOnly) throws SQLException(Code)(Java Doc) public void setTransactionIsolation(int level) throws SQLException(Code)(Java Doc) public void setTypeMapImpl(java.util.Map map) throws SQLException(Code)(Java Doc)
|
|
|