All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----oracle.jdbc.driver.OracleConnection
The implementation relies on native methods. The native methods do all the work and return error codes, a return value >= 0 means the call was successful. The Java methods call the native methods, check the error codes and raise exceptions if errors occured. If the native method get_error_message returns a string that can be used to explain the error to the user.
Statement
object that will generate
ResultSet
objects with the given type and concurrency.
CallableStatement
object that will generate
ResultSet
objects with the given type and concurrency.
PreparedStatement
object that will generate
ResultSet
objects with the given type and concurrency.
The DatabaseMetaData calls getTables and getColumns are extremely slow if the REMARKS column has to be reported as this necessitates an expensive outer join so by default the JDBC driver does not report the REMARKS columns.
You can turn the reporting of REMARKS on by passing a true argument to this method.
public static final boolean DEBUG
public DBAccess db_access
public DBConversion conversion
public boolean XA_wants_error
public boolean UsingXA
public static final int CHAR_TO_ASCII
public static final int CHAR_TO_UNICODE
public static final int RAW_TO_ASCII
public static final int RAW_TO_UNICODE
public static final int UNICODE_TO_CHAR
public static final int ASCII_TO_CHAR
public static final int NONE
public static final int JAVACHAR_TO_CHAR
public static final int RAW_TO_JAVACHAR
public static final int CHAR_TO_JAVACHAR
public OracleConnection(DBAccess access, String ur, String us, String p, String db, Properties info) throws SQLException
We allocate the c_state and call the native method "connect" that does the work. If connect fails we raise an exception.
public OracleConnection(OraclePooledConnection par, OracleConnection pc, boolean autoCommit) throws SQLException
public synchronized Statement createStatement() throws SQLException
public synchronized PreparedStatement prepareStatement(String sql) throws SQLException
public synchronized CallableStatement prepareCall(String sql) throws SQLException
public String nativeSQL(String sql) throws SQLException
public synchronized void setAutoCommit(boolean autoCommit) throws SQLException
public synchronized boolean getAutoCommit() throws SQLException
public synchronized void commit() throws SQLException
public synchronized void rollback() throws SQLException
public synchronized void close() throws SQLException
public synchronized boolean isClosed() throws SQLException
public synchronized DatabaseMetaData getMetaData() throws SQLException
public void setReadOnly(boolean readOnly) throws SQLException
public boolean isReadOnly() throws SQLException
public void setCatalog(String catalog) throws SQLException
public String getCatalog() throws SQLException
public synchronized void setTransactionIsolation(int level) throws SQLException
public int getTransactionIsolation() throws SQLException
public synchronized void setAutoClose(boolean autoClose) throws SQLException
public boolean getAutoClose() throws SQLException
public SQLWarning getWarnings() throws SQLException
public void clearWarnings() throws SQLException
public void trace(String s)
public synchronized void setDefaultRowPrefetch(int value) throws SQLException
If this value is not set by the user, only 1 row will be fetched at a time.
All statements created before this API was called will have a row prefetch of 1.
Row prefetching allows the JDBC driver to "fetch" multiple rows in one round-trip to the database. If this value is not set by the user, only 1 row will be fetched at a time.
To use the setDefaultRowPrefetch
entrypoint you have to
cast the Statement object to the type
oracle.jdbc.driver.OracleConnection
.
The user can override the row prefetch value set by this
oracle.jdbc.driver.OracleConnection
entrypoint
for individual statements, by calling
OracleStatement.setRowPrefetch
for those
statements.
The row_prefetch will be turned back to 1 automatically by the driver if any of the select-column types is streaming (long data or long raw data). This is overrides any value the user might set. Also, this will be done regardless of wether the streaming columns are read or not.
To use the setDefaultRowPrefetch
entrypoint you have to
cast the Connection object to the type
oracle.jdbc.driver.OracleConnection
.
public synchronized int getDefaultRowPrefetch()
The row prefetch from the connection is used for all statements
associated with this connection. However, the user can also define
a different row prefetch value for each statement.
This can be done using Oraclestatement.setRowPrefetch
,
which will override the default value provided from the connection.
Therefore, the row prefetch
value returned by this getDefaultRowPrefetch
entrypoint
is valid for statements for which the user has not defined a different
row prefetch.
To use the setDefaultRowPrefetch
entrypoint you have to
cast the Connection object to the type
oracle.jdbc.driver.OracleConnection
.
public synchronized void setDefaultExecuteBatch(int batch) throws SQLException
All statements created before using this API to set the batch value will have a batch value of 1.
Batching allows the JDBC driver to avoid making one round-trip to the RDBMS to execute a prepared statement every time bind variables change. The driver "batches" multiple executions of the statement with different bind variables. Actual execution normally happens when the number of executions reaches the pre-defined "batch" value. The set of bind variables along with the number of times the statement needs to be executed (equal to "batch"), are sent to the RDBMS in one round-trip.
To use the setDefaultExecuteBatch
entrypoint you have to
cast the Connection object to the type
oracle.jdbc.driver.OracleConnection
.
The user can override the batch value set by this
setDefaultExecuteBatch
entrypoint
for individual prepared statements, by calling
OraclePreparedStatement.setExecuteBatch
for those
statements.
The default value of batch will be overridden by the driver for a particular statement if that statement has any streaming bind values.
public synchronized int getDefaultExecuteBatch()
The batch value from the connection is used for all prepared statements
associated with this connection. However, the user can also define
a different batch value for individual prepared statements.
This can be done by using
OraclePreparedStatement.setExecuteBatch
, which
will override the default value provided from the connection.
Therefore, the row prefetch
value returned by this getDefaultExecuteBatch
entrypoint
is valid for prepared statements for which the user has not
defined a different batch value.
To use the getDefaultExecuteBatch
entrypoint you have to
cast the Connection object to the type
oracle.jdbc.driver.OracleConnection
.
public synchronized void setRemarksReporting(boolean reportRemarks)
The DatabaseMetaData calls getTables and getColumns are extremely slow if the REMARKS column has to be reported as this necessitates an expensive outer join so by default the JDBC driver does not report the REMARKS columns.
You can turn the reporting of REMARKS on by passing a true argument to this method. You turn it back off by passing a false argument.
You can also control the reporting of REMARKS by passing a property named "remarksReporting" as "true" to the DriverManager.getConnection call.
public synchronized boolean getRemarksReporting()
public void setIncludeSynonyms(boolean synonyms)
Similar to setRemarksReporting, getColumns performs extremely slow if information about synonyms has to be included, because it neccessitates an outer join. By default, the JDBC driver will not report information about table columns when you pass a synonym to getColumns.
You can get synonym information by passing true to this method, and turn it off by passing false. You can also control this behavior by passing a property named "includeSynonyms" as "true" to DriverManager.getConnection.
public boolean getIncludeSynonyms()
public synchronized void needLine() throws SQLException
public synchronized void holdLine(OracleStatement stmt)
public synchronized void releaseLine()
public synchronized void startup(String startup_str, int mode) throws SQLException
public synchronized void shutdown(int mode) throws SQLException
public synchronized void archive(int mode, int aseq, String acstext) throws SQLException
public synchronized void registerSQLType(String sql_name, String java_class_name) throws SQLException
public synchronized void registerSQLType(String sql_name, Class java_class) throws SQLException
public synchronized String getSQLType(Object obj) throws SQLException
public synchronized Object getJavaObject(String sql_name) throws SQLException
public synchronized void putDescriptor(String sql_name, Object desc) throws SQLException
public synchronized Object getDescriptor(String sql_name)
public short getJdbcCsId() throws SQLException
public short getDbCsId() throws SQLException
public synchronized short getStructAttrCsId() throws SQLException
public synchronized Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException
Statement
object that will generate
ResultSet
objects with the given type and concurrency.
This method is the same as the createStatement
method
above, but it allows the default result set
type and result set concurrency type to be overridden.
public synchronized PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
PreparedStatement
object that will generate
ResultSet
objects with the given type and concurrency.
This method is the same as the prepareStatement
method
above, but it allows the default result set
type and result set concurrency type to be overridden.
public synchronized CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
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 and result set concurrency type to be overridden.
public synchronized Dictionary getTypeMap()
public synchronized void setTypeMap(Dictionary map)
public void setUsingXAFlag(boolean value)
public boolean getUsingXAFlag()
public synchronized void setXAErrorFlag(boolean value)
public synchronized boolean getXAErrorFlag()
public synchronized void initUserName() throws SQLException
public synchronized String getUserName() throws SQLException
public synchronized byte[] getFDO() throws SQLException
public synchronized Object getClientData(Object key)
public synchronized Object setClientData(Object key, Object value)
public synchronized Object removeClientData(Object key)
All Packages Class Hierarchy This Package Previous Next Index