org.firebirdsql.jdbc

## Interface FirebirdConnection

- All Superinterfaces:
    java.lang.AutoCloseable, java.sql.Connection, java.sql.Wrapper
  All Known Implementing Classes:
    FBConnection

      public interface FirebirdConnection
      extends java.sql.Connection

  Extension of `Connection` interface providing access to Firebird specific features.
  Author:
    Roman Rokytskyy

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `TPB_CONCURRENCY` Deprecated.
    `static int` | `TPB_CONSISTENCY` Deprecated.
    `static int` | `TPB_NO_REC_VERSION` Deprecated.
    `static int` | `TPB_NOWAIT` Deprecated.
    `static int` | `TPB_READ` Deprecated.
    `static int` | `TPB_READ_COMMITTED` Deprecated.
    `static int` | `TPB_REC_VERSION` Deprecated.
    `static int` | `TPB_WAIT` Deprecated.
    `static int` | `TPB_WRITE` Deprecated.

    - ### Fields inherited from interface java.sql.Connection

      `TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.sql.Blob` | `createBlob()`
    `TransactionParameterBuffer` | `createTransactionParameterBuffer()` Create new instance of `TransactionParameterBuffer`.
    `FbDatabase` | `getFbDatabase()` Provides access to the low-level connection handle.
    `java.lang.String` | `getIscEncoding()` Deprecated. Will be removed in Jaybird 6
    `TransactionParameterBuffer` | `getTransactionParameters(int isolationLevel)` Get transaction parameters for the specified transaction isolation level.
    `boolean` | `isUseFirebirdAutoCommit()`
    `void` | `setTransactionParameters(int isolationLevel, int[] parameters)` Deprecated. use `setTransactionParameters(int, TransactionParameterBuffer)` instead.
    `void` | `setTransactionParameters(int isolationLevel, TransactionParameterBuffer tpb)` Set transaction parameters for the specified transaction isolation level.
    `void` | `setTransactionParameters(TransactionParameterBuffer tpb)` Set transaction parameters for the next transactions.

    - ### Methods inherited from interface java.sql.Connection

      `abort, clearWarnings, close, commit, createArrayOf, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, 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, setTransactionIsolation, setTypeMap`

    - ### Methods inherited from interface java.sql.Wrapper

      `isWrapperFor, unwrap`

- - ### Field Detail

    - #### TPB_READ_COMMITTED

          @Deprecated
          static final int TPB_READ_COMMITTED

      Deprecated.
      See Also:
        Constant Field Values

    - #### TPB_CONCURRENCY

          @Deprecated
          static final int TPB_CONCURRENCY

      Deprecated.
      See Also:
        Constant Field Values

    - #### TPB_CONSISTENCY

          @Deprecated
          static final int TPB_CONSISTENCY

      Deprecated.
      See Also:
        Constant Field Values

    - #### TPB_READ

          @Deprecated
          static final int TPB_READ

      Deprecated.
      See Also:
        Constant Field Values

    - #### TPB_WRITE

          @Deprecated
          static final int TPB_WRITE

      Deprecated.
      See Also:
        Constant Field Values

    - #### TPB_WAIT

          @Deprecated
          static final int TPB_WAIT

      Deprecated.
      See Also:
        Constant Field Values

    - #### TPB_NOWAIT

          @Deprecated
          static final int TPB_NOWAIT

      Deprecated.
      See Also:
        Constant Field Values

    - #### TPB_REC_VERSION

          @Deprecated
          static final int TPB_REC_VERSION

      Deprecated.
      See Also:
        Constant Field Values

    - #### TPB_NO_REC_VERSION

          @Deprecated
          static final int TPB_NO_REC_VERSION

      Deprecated.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### createBlob

          java.sql.Blob createBlob()
                            throws java.sql.SQLException

      Specified by:
        `createBlob` in interface `java.sql.Connection`
      Returns:
        instance of `FirebirdBlob`.
      Throws:
        `java.sql.SQLException`

    - #### getIscEncoding

          @Deprecated
          java.lang.String getIscEncoding()
                                                throws java.sql.SQLException

      Deprecated. Will be removed in Jaybird 6
      Get current ISC encoding.
      Returns:
        current ISC encoding.
      Throws:
        `java.sql.SQLException`

    - #### setTransactionParameters

          @Deprecated
          void setTransactionParameters(int isolationLevel,
                                                     int[] parameters)
                                              throws java.sql.SQLException

      Deprecated. use `setTransactionParameters(int, TransactionParameterBuffer)` instead.
      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:
        `java.sql.SQLException` - if specified transaction parameters cannot be set.

    - #### getTransactionParameters

          TransactionParameterBuffer getTransactionParameters(int isolationLevel)
                                                       throws java.sql.SQLException

      Get transaction parameters for the specified transaction isolation level.
      Parameters:
        `isolationLevel` - isolation level defined in the `Connection` interface.
      Returns:
        instance of `TransactionParameterBuffer` containing current transaction parameters.
      Throws:
        `java.sql.SQLException` - if error occurred obtaining transaction parameters.

    - #### createTransactionParameterBuffer

          TransactionParameterBuffer createTransactionParameterBuffer()
                                                               throws java.sql.SQLException

      Create new instance of `TransactionParameterBuffer`.
      Returns:
        empty instance of `TransactionParameterBuffer`.
      Throws:
        `java.sql.SQLException` - if error occurred during this operation.

    - #### setTransactionParameters

          void setTransactionParameters(int isolationLevel,
                                        TransactionParameterBuffer tpb)
                                 throws java.sql.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:
        `tpb` - instance of `TransactionParameterBuffer` with parameters to set.
      Throws:
        `java.sql.SQLException` - if error occurred during this operation.

    - #### setTransactionParameters

          void setTransactionParameters(TransactionParameterBuffer tpb)
                                 throws java.sql.SQLException

      Set transaction parameters for the next transactions.

      This method does not change the TPB mapping, but replaces the mapping for the current transaction isolation until `Connection.setTransactionIsolation(int)` is called.

      Method cannot be called when transaction has already started.

      Parameters:
        `tpb` - instance of `TransactionParameterBuffer` with new transaction parameters.
      Throws:
        `java.sql.SQLException` - if method is called within a transaction.

    - #### isUseFirebirdAutoCommit

          boolean isUseFirebirdAutoCommit()

      Returns:
        `true` if this connection is configured to use `isc_tpb_autocommit` when in auto commit.

    - #### getFbDatabase

          @InternalApi
          FbDatabase getFbDatabase()
                                          throws java.sql.SQLException

      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:
        `java.sql.SQLException`

Copyright © 2001-2025 Jaybird (Firebird JDBC) team. All rights reserved.