JDBC Standards
This chapter describes the JDBC functions that are supported by tbJDBC.
tbJDBC conforms to JDBC 4.0. Each JDBC standard specifies required and optional functions that each vendor can select to implement.
JDBC 2.0
Interface Methods
tbJDBC supports the following interface objects.
java.sql.Array
java.sql.Blob
java.sql.CallableStatement
java.sql.Clob
java.sql.Connection
java.sql.DatabaseMetaData
java.sql.Driver
java.sql.PreparedStatement
java.sql.ResultSet
java.sql.ResultSetMetaData
java.sql.Statement
java.sql.Struct
tbJDBC does NOT support the following interface objects.
java.sql.Ref
java.sql.SQLData
java.sql.SQLInput
java.sql.SQLOutput
Main Features
The following features are supported under the JDBC 2.0 standard.
Result Sets
tbJDBC supports the following features for result sets.
Scrolling tbJDBC can create a scrollable result set that supports scrolling. This feature enables users to search the result set forward or backward by scrolling up or down, and to move to a relative or absolute position within the result set.
Result Set Types
Forward-only
Data values which were set when the result set was first created are fixed. Only forward search is available.
Scroll-insensitive
Like forward-only result sets, data values which were set when the result set was first created are fixed. Because scroll-insensitive result sets are scrollable result sets, it is possible to search the result sets forward or backward or from a relative or absolute position.
Scroll-sensitive
Sensitive to changes in the database. If data is modified, the change is
immediately applied to the result set, so the user can see the modified data.
Concurrency type One of the following concurrency types can be specified for a result set.
Read-only
Data cannot be modified. Locking does not occur.
Updatable
Data can be modified. If two users access the same data, the data is locked, preventing concurrent executions.
Batch update
The batch update function enables users to process multiple DML statements at once. The function is also used to process individual INSERT statement or prepared statements after changing their parameters, which improves system performance.
Data type
tbJDBC supports BLOB(Binary Large Object) and CLOB(Character Large Object) data types. To get BLOB or CLOB data types, use the getBlob() method or getClob() method, and to store the data, use setBlob() or setClob().
JDBC 3.0
Interface Methods
tbJDBC supports the following interface objects.
java.sql.ParameterMetaData
java.sql.Savepoints
tbJDBC also supports the following interface objects of the javax.sql package.
javax.sql.ConnectionEventListener
javax.sql.ConnectionPoolDataSource
javax.sql.DataSource
javax.sql.PooledConnection
javax.sql.RowSet
javax.sql.RowSetInternal
javax.sql.RowSetListener
javax.sql.RowSetMetaData
javax.sql.RowSetReader
javax.sql.RowSetWriter
javax.sql.XAConnection
javax.sql.XADataSource
Main Features
tbJDBC supports JDBC 3.0 except several functions.
Supported Features
The following features are supported under the JDBC 3.0 standard.
Savepoints The savepoint interface is implemented to set a savepoint for a transaction and to provide the commit and rollback functions. The Connection.releaseSavepoint java.sql method for releasing a specific savepoint is not supported.
Statement Pooling Provides a pool of statements related to connection pooling.
Connection Pooling Supports the settings that can be configured in the ConnectionPoolDataSource interface. Specify DataSource objects to determine the features of the pooled connection to be created.
Parameter Metadata The JDBC class which implements the ParameterMetaData interface provides information about the number of parameters used by the prepared statement. Metadata for data types and properties are not supported.
Auto-Generated Keys After executing an SQL statement, the key for the result row or the value of the automatically generated column can be obtained from the result set using the getGeneratedKeys function.
Named Parameters A parameter name can be used to identify the parameter among stored parameters of the CallableStatement object.
Result Set Holdability Determines whether to keep the result set when a commit occurs while the result is open. tbJDBC only supports the option to keep the result set without closing it.
Returning Multiple Result Sets A single SQL statement can open multiple result sets.
Modifying Data in a BLOB or CLOB Object Data contained in a BLOB object or a CLOB object can be modified through the updateXYZ API.
Unsupported Features
The following features are not supported.
BOOLEAN, DATALINK, and URL data types
Modification of the REF object
Group conversion and data type mapping
JDBC 4.0
Interface Methods
tbJDBC supports the following interface objects.
java.sql.NClob
java.sql.RowId
java.sql.SQLXML
java.sql.Wrapper
tbJDBC also supports the following interface objects of the javax.sql package.
javax.sql.StatementEventListener
Main Features
Supported Features
The following features are supported under the JDBC 4.0 standard.
XML Data type XML data types added to SQL:2003 can be used through the SQLXML interface.
Automatic Driver Detection Drivers are automatically loaded, so you can use driver objects without loading the java.sql.Driver class by using Class.forName.
National Language Character Sets An API for supporting national language character sets that the database can use has been added.
Improved SQLException Consecutive exceptions can be created, so more detailed information can be passed. New exception types have been added.
Improved Blob/Clob featuers Supports the API for creating or releasing a BLOB object or a CLOB object.
ClientInfo Configuration Supports Clientinfo settings and queries using setClientInfo/getClientInfo.
The SQL ROWID Data Type The SQL ROWID type can be used with the RowId object.
Permission to Access the Actual JDBC Object The actual JDBC object can be accessed in the application server or a connection pooling environment using the Wrapper object.
Notification of the Condition of Connections in a Connection Pooling Environment When the actual connection is closed or becomes invalid in a connection pooling environment, the pooled statement is notified.
User-defined Type Queries and PSM Calls Using User-defined Type Parameters User-defined struct and array types can be created. They can be inbound, and also can be outbound after selected from a server for structured queries.
JDBC 4.1
Interface Methods
tbJDBC supports the following interface objects.
java.sql.Connection - void abort(Executor executor) - void setSchema(String schema) - String getSchema()
java.sql.Statement - void closeOnCompletion() - boolean isCloseOnCompletion()
java.sql.ResultSet - <T> T getObject(int parameterIndex, Class<T> type)
Main Features
Supported Features
The following features are supported under the JDBC 4.1 standard.
BIGINT Supports java.math.BigInteger and JDBC type BIGINT.
Connection - Supports disconnection using the abort feature. - Supports schema setting with setSchema feature. - Supports timeout setting with setNetworkTimeout feature.
Statement Supports closing statements upon the end of result sets using the closeOnCompletion feature.
ResultSet Supports specifying return types using a class as the argument of the getObject feature.
JDBC 4.1 is supported starting from Tibero 7 FS02 release.
JDBC 4.2
Interface Methods
tbJDBC supports the following interface objects.
java.sql.CallableStatement
void registerOutParameter(int parameterIndex, SQLType sqlType)
java.sql.PreparedStatement
void setObject(int parameterIndex, Object x, SQLType targetSqlType)
java.sql.Statement
long executeLargeUpdate()
java.sql.SQLInput
<T> T readObject(Class<T> type)
java.sql.SQLOutput
void writeObject(Object x, SQLType sqlType)
Main Features
Supported Features
The following features are supported under the JDBC 4.2 standard.
java.time Supports LocalDate, LocalTime, LocalDateTime, OffsetTime and OffsetDateTime types.
SQLType Supports specifying types with SQLType by using the setObject and registerOutParameter.
Statement Supports getting counts of updates with the executeLargeUpdate feature.
JDBC 4.2 is supported starting from Tibero 7 FS02 release.
Last updated