Package org.firebirdsql.jdbc
Interface FirebirdConnection
- All Superinterfaces:
AutoCloseable,Connection,Wrapper
- All Known Implementing Classes:
FBConnection
Extension of
Connection interface providing access to Firebird
specific features.- Author:
- Roman Rokytskyy
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from interface java.sql.Connection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE -
Method Summary
Modifier and TypeMethodDescriptionCreate new instance ofTransactionParameterBuffer.Provides access to the low-level connection handle.Get current ISC encoding.getTransactionParameters(int isolationLevel) Get transaction parameters for the specified transaction isolation level.booleanvoidsetTransactionParameters(int isolationLevel, int[] parameters) Deprecated.voidsetTransactionParameters(int isolationLevel, TransactionParameterBuffer tpb) Set transaction parameters for the specified transaction isolation level.voidSet transaction parameters for the next transactions.Methods inherited from interface java.sql.Connection
abort, beginRequest, clearWarnings, close, commit, createArrayOf, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, endRequest, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getHoldability, getMetaData, getNetworkTimeout, getSchema, getTransactionIsolation, getTypeMap, getWarnings, isClosed, isReadOnly, isValid, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, rollback, setAutoCommit, setCatalog, setClientInfo, setClientInfo, setHoldability, setNetworkTimeout, setReadOnly, setSavepoint, setSavepoint, setSchema, setShardingKey, setShardingKey, setShardingKeyIfValid, setShardingKeyIfValid, setTransactionIsolation, setTypeMapMethods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
-
Field Details
-
TPB_READ_COMMITTED
static final int TPB_READ_COMMITTED- See Also:
-
TPB_CONCURRENCY
static final int TPB_CONCURRENCY- See Also:
-
TPB_CONSISTENCY
static final int TPB_CONSISTENCY- See Also:
-
TPB_READ
static final int TPB_READ- See Also:
-
TPB_WRITE
static final int TPB_WRITE- See Also:
-
TPB_WAIT
static final int TPB_WAIT- See Also:
-
TPB_NOWAIT
static final int TPB_NOWAIT- See Also:
-
TPB_REC_VERSION
static final int TPB_REC_VERSION- See Also:
-
TPB_NO_REC_VERSION
static final int TPB_NO_REC_VERSION- See Also:
-
-
Method Details
-
createBlob
- Specified by:
createBlobin interfaceConnection- Returns:
- instance of
FirebirdBlob. - Throws:
SQLException
-
getIscEncoding
Get current ISC encoding.- Returns:
- current ISC encoding.
- Throws:
SQLException
-
setTransactionParameters
Deprecated.Set transaction parameters for the specified isolation level. They will take effect only on the newly started transaction.- Parameters:
isolationLevel- JDBC isolation level.parameters- array of TPB parameters, see all TPB_* constants.- Throws:
SQLException- if specified transaction parameters cannot be set.
-
getTransactionParameters
Get transaction parameters for the specified transaction isolation level.- Parameters:
isolationLevel- isolation level defined in theConnectioninterface.- Returns:
- instance of
TransactionParameterBuffercontaining current transaction parameters. - Throws:
SQLException- if error occured obtaining transaction parameters.
-
createTransactionParameterBuffer
Create new instance ofTransactionParameterBuffer.- Returns:
- empty instance of
TransactionParameterBuffer. - Throws:
SQLException- if error occured during this operation.
-
setTransactionParameters
void setTransactionParameters(int isolationLevel, TransactionParameterBuffer tpb) throws SQLException Set transaction parameters for the specified transaction isolation level. This method replaces the default TPB mapping with the specified one, changes will be effective from the next transaction start.- Parameters:
isolationLevel- isolation level defined in theConnectioninterface.tpb- instance ofTransactionParameterBufferwith parameters to set.- Throws:
SQLException- if error occured during this operation.
-
setTransactionParameters
Set transaction parameters for the next transactions. This method does not change the TPB mapping, but replaces the mapping for the current transaction isolation untilConnection.setTransactionIsolation(int)is called.Method cannot be called when transaction has already started.
- Parameters:
tpb- instance ofTransactionParameterBufferwith new transaction parameters.- Throws:
SQLException- if method is called within a transaction.
-
isUseFirebirdAutoCommit
boolean isUseFirebirdAutoCommit()- Returns:
trueif this connection is configured to useisc_tpb_autocommitwhen in auto commit.
-
getFbDatabase
Provides access to the low-level connection handle.WARNING using this connection handle directly may bring the JDBC connection in an inconsistent state.
- Returns:
- The low-level connection handle.
- Throws:
SQLException
-
setTransactionParameters(int, TransactionParameterBuffer)instead.