JDBC API Compatibility
There are compatibility issues that apply to the JDBC API.
Compatibility issues that apply to JDBC include the following:
-
JDBC database metadata functions return TimesTen metadata. If you want Oracle metadata, connect to the Oracle Database directly.
-
The set/get connection and statement attributes are performed on TimesTen.
-
All Oracle
java.sql.ResultSet
metadata (length, type, label) is returned in TimesTen data type lengths. The column labels that are returned are TimesTen column labels. -
Oracle extensions (
oracle.sql
andoracle.jdbc
packages) are not supported. -
Java stored procedures are not supported in TimesTen.
java.sql.Connection
The following Connection
methods have no compatibility issues:
close() commit() createStatement() prepareCall() prepareStatement() rollback() setAutoCommit()
The following methods are run locally in TimesTen:
getCatalog() getMetaData get/setTransactionIsolation() isReadOnly() isClosed() nativeSQL() setCatalog() setReadOnly()
Note:
See Transaction Semantics for restrictions for the
get/setTransactionIsolation()
methods.
The isClosed()
method returns only the TimesTen connection status.
java.sql.Statement
The following Statement
methods have no compatibility issues:
addBatch() clearBatch() close() execute() executeBatch() executeQuery() executeUpdate() getResultSet() getUpdateCount() getWarnings()
The following methods run locally in TimesTen:
cancel() get/setMaxFieldSize() get/setMaxRows() get/setQueryTimeout() getMoreResults() setEscapeProcessing() setCursorName()
java.sql.ResultSet
The following ResultSet
methods have no compatibility issues:
close() findColumn(int) and findColumn(string) getXXX(number) and getXXX(name) getXXXStream(int) and getXXXStream(string) getMetaData()
java.sql.PreparedStatement
The following PreparedStatement
methods have no compatibility issues:
addBatch() close() execute() executeUpdate() executeQuery() getResultSet() getUpdateCount() setXXX() setXXXStream()
The following methods run locally in TimesTen:
cancel() get/setMaxFieldSize() get/setMaxRows() get/setQueryTimeout() getMoreResults() setEscapeProccessing() setCursorName()
java.sql.CallableStatement
The same restrictions as shown for the java.sql.Statement
and java.sql.PreparedStatement
interfaces apply to CallableStatement
.
-
In a
WRITETHROUGH
cache group, ifPassThrough
=1
, indirect DML operations that are hidden in stored procedures or induced by triggers may be passed through without being detected by Cache Connect to Oracle. -
Stored procedures that update, insert, or delete from
READONLY
cache group tables will be autorefreshed within another transaction in an asynchronous fashion. Thus, the changes do not appear within the same transaction that the stored procedure was processed within and there may be some time lapse before the changes are autorefreshed into the cache table.
java.sql.ResultSetMetaData
The following ResultSetMetaData
methods have no compatibility issues:
getColumnCount() getColumnType() getColumnLabel() getColumnName() getTableName() isNullable()
The following methods run locally in TimesTen:
getSchemaName() getCatalogName() getColumnDisplaySize() getColumnType() getColumnTypeName() getPrecision() getScale() isAutoIncrement() isCaseSensitive() isCurrency() isDefinitelyWritable() isReadOnly() isSearchable() isSigned() isWritable()
Stream Support
There are compatibility issues related to streams.
The compatibility issues related to streams are:
-
The JDBC driver fully fetches the data into an in-memory buffer during a call to the
executeQuery()
ornext()
methods. ThegetXXXStream()
entry points return a stream that reads data from this buffer. -
Oracle supports up to 2 GB of long or long raw data. When cached, TimesTen converts
LONG
data intoVARCHAR2
data. TimesTen convertsLONG RAW
data intoVARBINARY
data. BothVARCHAR2
andVARBINARY
data types can store up to a maximum 4,194,304 (222) bytes). -
Oracle always streams
LONG
/LONG RAW
data even if the application does not callgetXXXStream()
. -
TimesTen does not support the
mark()
,markSupported()
, andreset()
methods.