Class FbConnectionProperties

    • Constructor Detail

      • FbConnectionProperties

        public FbConnectionProperties​(IConnectionProperties src)
        Copy constructor for FbConnectionProperties.

        All properties defined in IConnectionProperties are copied from src to the new instance.

        Parameters:
        src - Source to copy from
      • FbConnectionProperties

        public FbConnectionProperties()
        Default constructor for FbConnectionProperties
    • Method Detail

      • setDatabaseName

        public void setDatabaseName​(java.lang.String databaseName)
        Specified by:
        setDatabaseName in interface IConnectionProperties
        Parameters:
        databaseName - Name or alias of the database
      • getPageCacheSize

        public int getPageCacheSize()
        Description copied from interface: IConnectionProperties
        Get the page cache size.

        A value of 0 indicates that the value is not set, and that the server default is used.

        This option is only relevant for Firebird implementations with per connection cache (eg Classic)

        NOTE: Implementer should take care to return IConnectionProperties.DEFAULT_BUFFERS_NUMBER if the value hasn't been set yet.

        Specified by:
        getPageCacheSize in interface IConnectionProperties
        Returns:
        number of cache buffers that should be allocated for this connection, should be specified for ClassicServer instances, SuperServer has a server-wide configuration parameter.
      • setPageCacheSize

        public void setPageCacheSize​(int pageCacheSize)
        Description copied from interface: IConnectionProperties
        Set the page cache size.

        A value of 0 indicates that the value is not set, and that the server default is used.

        This option is only relevant for Firebird implementations with per connection cache (eg Classic)

        NOTE: Implementer should take care to use IConnectionProperties.DEFAULT_BUFFERS_NUMBER if the value hasn't been set yet.

        Specified by:
        setPageCacheSize in interface IConnectionProperties
        Parameters:
        pageCacheSize - number of cache buffers that should be allocated for this connection, should be specified for ClassicServer instances, SuperServer has a server-wide configuration parameter.
      • setResultSetDefaultHoldable

        public void setResultSetDefaultHoldable​(boolean holdable)
        Description copied from interface: IConnectionProperties
        Set if ResultSet should be ResultSet.HOLD_CURSORS_OVER_COMMIT by default.
        Specified by:
        setResultSetDefaultHoldable in interface IConnectionProperties
        Parameters:
        holdable - true ResultSets are holdable, false (default) ResultSets are ResultSet.CLOSE_CURSORS_AT_COMMIT
      • isResultSetDefaultHoldable

        public boolean isResultSetDefaultHoldable()
        Description copied from interface: IConnectionProperties
        Get whether ResultSets are holdable by default.
        Specified by:
        isResultSetDefaultHoldable in interface IConnectionProperties
        Returns:
        true ResultSets by default are ResultSet.HOLD_CURSORS_OVER_COMMIT, false (default), ResultSets are ResultSet.CLOSE_CURSORS_AT_COMMIT
      • setColumnLabelForName

        public void setColumnLabelForName​(boolean columnLabelForName)
        Description copied from interface: IConnectionProperties
        Set if ResultSetMetaData.getColumnName(int) returns the columnLabel instead of the columnName.

        The default behaviour (with columnLabelForName=false is JDBC-compliant. The behavior for value true is to provide compatibility with tools with a wrong expectation.

        Specified by:
        setColumnLabelForName in interface IConnectionProperties
        Parameters:
        columnLabelForName - false JDBC compliant behavior (columnName is returned), true compatibility option (columnLabel is returned)
      • setSessionTimeZone

        public void setSessionTimeZone​(java.lang.String sessionTimeZone)
        Description copied from interface: IConnectionProperties
        Sets the sessionTimeZone.
        Specified by:
        setSessionTimeZone in interface IConnectionProperties
        Parameters:
        sessionTimeZone - Firebird 4+ session time zone name (we strongly suggest to use Java compatible names only), use "server" to use server default time zone (note: conversion will use JVM default time zone)
      • getExtraDatabaseParameters

        public DatabaseParameterBuffer getExtraDatabaseParameters()
        Description copied from interface: IConnectionProperties
        Gets the extra database parameters. This can be used to pass extra database parameters that are not directly supported.

        An immutable instance of IConnectionProperties must return a copy.

        Specified by:
        getExtraDatabaseParameters in interface IConnectionProperties
        Returns:
        DatabaseParameterBuffer instance.
      • fromDpb

        @Deprecated
        public void fromDpb​(DatabaseParameterBuffer dpb)
                     throws java.sql.SQLException
        Deprecated.
        TODO: This method is only intended to simplify migration of the protocol implementation and needs to be removed.
        Method to populate an FbConnectionProperties from a database parameter buffer.

        Unsupported or unknown properties are ignored.

        Parameters:
        dpb - Database parameter buffer
        Throws:
        java.sql.SQLException