Class FirebirdSupportInfo
- java.lang.Object
- 
- org.firebirdsql.util.FirebirdSupportInfo
 
- 
 public final class FirebirdSupportInfo extends java.lang.ObjectHelper class that reports if a Firebird version supports a specific feature.Intended as a repository for Jaybird to check for functionality support, or tests to check their assumptions, or decide on test or application behavior based on functionality support. Primary reason for existence of this class is to support version dependent functionality in Jaybird or version dependent tests in the Jaybird test suite, so feature checks are only added when they are necessary for Jaybird or the test suite. That said: if you miss feature checks, don't hesitate to create an issue in the Jaybird tracker. - Since:
- 3.0
- Author:
- Mark Rotteveel
 
- 
- 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetSystemTableCount()The number of system tables (including monitoring tables).booleanisVersionBelow(int majorVersion, int minorVersion)Check if the major.minor of this version is below the specified version.booleanisVersionEqualOrAbove(int majorVersion, int minorVersion)Check if the major.minor of this version is equal to or larger than the specified version.booleanisVersionEqualOrAbove(int requiredMajorVersion, int requiredMinorVersion, int requiredVariant)Check if the major.minor.variant of this version is equal to or larger than the specified required version.intmaxDecimalPrecision()intmaxIdentifierLengthBytes()intmaxIdentifierLengthCharacters()intmaxReportedIdentifierLengthBytes()intreportedMetadataCharacterSetId()booleanreportsBlobCharSetInDescriptor()booleanreportsByteLengthInDescriptor()TODO: Check if this is for all types or only for metadata.static FirebirdSupportInfosupportInfoFor(java.sql.Connection connection)static FirebirdSupportInfosupportInfoFor(GDSServerVersion serverVersion)static FirebirdSupportInfosupportInfoFor(FbAttachment attachment)booleansupportsAuthenticationPlugin(java.lang.String pluginName)Checks whether the Firebird version supports a plugin name.booleansupportsBigint()Checks if BIGINT is supported.booleansupportsBoolean()booleansupportsCancelOperation()booleansupportsCase()booleansupportsCaseSensitiveUserNames()booleansupportsComment()booleansupportsCustomExceptionMessages()booleansupportsDecfloat()booleansupportsDecimalPrecision(int precision)Support for decimal (and numeric) precision.booleansupportsExecuteBlock()booleansupportsExplainedExecutionPlan()booleansupportsFloatBinaryPrecision()booleansupportsFullSearchableBlobs()booleansupportsGetSetContext()booleansupportsGlobalTemporaryTables()booleansupportsIdentityColumns()booleansupportsInsertReturning()TODO: Add methods for other RETURNING types?booleansupportsInt128()booleansupportsMonitoringTables()booleansupportsNativeUserDefinedFunctions()booleansupportsNBackupCleanHistory()booleansupportsNBackupInPlaceRestore()booleansupportsNBackupWithGuid()booleansupportsNullDataType()booleansupportsPackages()booleansupportsPageSize(int pageSize)booleansupportsParametrizedExceptions()booleansupportsProtocol(int protocolVersion)Checks support for protocol versions.booleansupportsPsqlFunctions()booleansupportsRecordVersionPseudoColumn()booleansupportsReturningAll()booleansupportsSavepoint()booleansupportsSqlUserManagement()booleansupportsStatementTimeouts()booleansupportsTableAlias()booleansupportsTimeZones()booleansupportsUpdateReturning()booleansupportsUserAndGroupIdInUser()booleansupportsUtf8()booleansupportsWireCompression()booleansupportsWireEncryption()
 
- 
- 
- 
Method Detail- 
isVersionEqualOrAbovepublic boolean isVersionEqualOrAbove(int majorVersion, int minorVersion)Check if the major.minor of this version is equal to or larger than the specified version.- Parameters:
- majorVersion- Major version
- minorVersion- Minor version
- Returns:
- truewhen current major is larger than required, or major is same and minor is equal to or larger than required
 
 - 
isVersionEqualOrAbovepublic boolean isVersionEqualOrAbove(int requiredMajorVersion, int requiredMinorVersion, int requiredVariant)Check if the major.minor.variant of this version is equal to or larger than the specified required version.- Parameters:
- requiredMajorVersion- Required major version
- requiredMinorVersion- Required minor version
- requiredVariant- Required variant version
- Returns:
- truewhen current major is larger than required, or major is same and minor is equal to required and variant equal to or larger than required, or major is same and minor is larger than required
 
 - 
isVersionBelowpublic boolean isVersionBelow(int majorVersion, int minorVersion)Check if the major.minor of this version is below the specified version.Equivalent to !isVersionEqualOrAbove(majorVersion, minorVersion).- Parameters:
- majorVersion- Major version
- minorVersion- Minor version
- Returns:
- truewhen current major is smaller than the specified major, or major is same and minor is smaller than the specified minor
 
 - 
supportsBigintpublic boolean supportsBigint() Checks if BIGINT is supported.Low level this feature was added in Interbase 6.0 / Firebird 1.0, but it was never surfaced in DDL - Returns:
- truewhen the data type BIGINT is supported
 
 - 
supportsBooleanpublic boolean supportsBoolean() - Returns:
- truewhen the data type BOOLEAN is supported
 
 - 
supportsDecfloatpublic boolean supportsDecfloat() - Returns:
- truewhen the data type DECFLOAT is supported
 
 - 
supportsDecimalPrecisionpublic boolean supportsDecimalPrecision(int precision) Support for decimal (and numeric) precision.- Parameters:
- precision- Precision
- Returns:
- truewhen DECIMAL (and NUMERIC) support the supplied precision; 0 or negative precision always return- false
 
 - 
maxDecimalPrecisionpublic int maxDecimalPrecision() - Returns:
- The maximum decimal and numeric precision
 
 - 
supportsInt128public boolean supportsInt128() - Returns:
- truewhen the data type INT128 is supported
 
 - 
supportsCommentpublic boolean supportsComment() - Returns:
- truewhen the COMMENT statement is supported
 
 - 
supportsGetSetContextpublic boolean supportsGetSetContext() - Returns:
- truewhen RDB$GET_CONTEXT and RDB$SET_CONTEXT are supported
 
 - 
supportsCasepublic boolean supportsCase() - Returns:
- truewhen CASE (simple or searched) is supported
 
 - 
reportsBlobCharSetInDescriptorpublic boolean reportsBlobCharSetInDescriptor() - Returns:
- truewhen the blob character set is reported in the scale of the field descriptor
 
 - 
reportsByteLengthInDescriptorpublic boolean reportsByteLengthInDescriptor() TODO: Check if this is for all types or only for metadata.- Returns:
- truewhen the length of the field descriptor reports the byte length (max byte per char * char length)
 
 - 
supportsInsertReturningpublic boolean supportsInsertReturning() TODO: Add methods for other RETURNING types?- Returns:
- truewhen INSERT ... RETURNING ... is supported
 
 - 
supportsUpdateReturningpublic boolean supportsUpdateReturning() - Returns:
- truewhen UPDATE ... RETURNING ... is supported
 
 - 
supportsReturningAllpublic boolean supportsReturningAll() - Returns:
- truewhen- RETURNING *and- RETURNING ref.*is supported.
 
 - 
supportsUtf8public boolean supportsUtf8() - Returns:
- truewhen the server knows the UTF8 character set (NOTE: For firebird 1.5 it is an alias for UNICODE_FSS)
 
 - 
supportsSavepointpublic boolean supportsSavepoint() - Returns:
- truewhen SAVEPOINT is supported
 
 - 
supportsExecuteBlockpublic boolean supportsExecuteBlock() - Returns:
- truewhen EXECUTE BLOCK is supported
 
 - 
supportsSqlUserManagementpublic boolean supportsSqlUserManagement() - Returns:
- truewhen CREATE/ALTER/DROP USER is supported
 
 - 
supportsCancelOperationpublic boolean supportsCancelOperation() - Returns:
- truewhen fb_cancel_operation is supported
 
 - 
supportsTableAliaspublic boolean supportsTableAlias() - Returns:
- truewhen field descriptors contain table alias information
 
 - 
supportsNullDataTypepublic boolean supportsNullDataType() - Returns:
- truewhen the- NULLdata type and- ? IS NULLis supported
 
 - 
supportsUserAndGroupIdInUserpublic boolean supportsUserAndGroupIdInUser() - Returns:
- truewhen- isc_spb_sec_useridand- isc_spb_sec_groupidare supported.
 
 - 
supportsProtocolpublic boolean supportsProtocol(int protocolVersion) Checks support for protocol versions. The check is limited to those protocol versions supported by Jaybird (10-15 at this time, although v14 is only implemented as part of v15).- Parameters:
- protocolVersion- Protocol version number
- Returns:
- truewhen the database supports the specified protocol
 
 - 
supportsCustomExceptionMessagespublic boolean supportsCustomExceptionMessages() - Returns:
- truewhen custom exception messages are supported.
 
 - 
supportsParametrizedExceptionspublic boolean supportsParametrizedExceptions() - Returns:
- truewhen parametrized exceptions are supported.
 
 - 
supportsMonitoringTablespublic boolean supportsMonitoringTables() - Returns:
- truewhen monitoring tables are supported.
 
 - 
supportsGlobalTemporaryTablespublic boolean supportsGlobalTemporaryTables() - Returns:
- truewhen global temporary tables (GTTs) are supported.
 
 - 
supportsFullSearchableBlobspublic boolean supportsFullSearchableBlobs() - Returns:
- truewhen blobs are fully searchable (eg using `LIKE`).
 
 - 
supportsIdentityColumnspublic boolean supportsIdentityColumns() - Returns:
- truewhen identity columns are supported.
 
 - 
maxIdentifierLengthCharacterspublic int maxIdentifierLengthCharacters() - Returns:
- The maximum number of characters in an identifier.
 
 - 
maxIdentifierLengthBytespublic int maxIdentifierLengthBytes() - Returns:
- The maximum number of bytes in an identifier.
- See Also:
- maxReportedIdentifierLengthBytes()
 
 - 
maxReportedIdentifierLengthBytespublic int maxReportedIdentifierLengthBytes() - Returns:
- The maximum number of bytes reported in parameter metadata for an identifier
- See Also:
- maxIdentifierLengthBytes()
 
 - 
reportedMetadataCharacterSetIdpublic int reportedMetadataCharacterSetId() - Returns:
- The character set id of system metadata
 
 - 
supportsPageSizepublic boolean supportsPageSize(int pageSize) 
 - 
supportsWireEncryptionpublic boolean supportsWireEncryption() 
 - 
supportsWireCompressionpublic boolean supportsWireCompression() - Returns:
- truewhen zlib wire compression is supported
 
 - 
supportsNativeUserDefinedFunctionspublic boolean supportsNativeUserDefinedFunctions() - Returns:
- truewhen UDFs (User Defined Functions) - backed by a native library - are supported
 
 - 
supportsPsqlFunctionspublic boolean supportsPsqlFunctions() - Returns:
- truewhen PSQL functions are supported
 
 - 
supportsAuthenticationPluginpublic boolean supportsAuthenticationPlugin(java.lang.String pluginName) Checks whether the Firebird version supports a plugin name.Firebird version 2.5 and earlier are considered to support only Legacy_Auth.NOTE: This method only checks if the specified plugin was shipped with a Firebird version, it does not check whether the plugin is enabled, nor if additional plugins are installed. - Parameters:
- pluginName- Authentication plugin name (case-sensitive)
- Returns:
- trueif supported,- falseotherwise.
 
 - 
supportsRecordVersionPseudoColumnpublic boolean supportsRecordVersionPseudoColumn() - Returns:
- truewhen- RDB$RECORD_VERSIONpseudo column is supported
 
 - 
getSystemTableCountpublic int getSystemTableCount() The number of system tables (including monitoring tables).- Returns:
- Number of system tables, or -1if the Firebird version is not known/supported.
 
 - 
supportsCaseSensitiveUserNamespublic boolean supportsCaseSensitiveUserNames() - Returns:
- truewhen this Firebird version supports case sensitive user names.
 
 - 
supportsExplainedExecutionPlanpublic boolean supportsExplainedExecutionPlan() - Returns:
- truewhen this Firebird version supports explained (detailed) execution plans.
 
 - 
supportsTimeZonespublic boolean supportsTimeZones() - Returns:
- truewhen this Firebird version supports- TIME(STAMP) WITH TIME ZONE
 
 - 
supportsPackagespublic boolean supportsPackages() - Returns:
- truewhen this Firebird version supports packages.
 
 - 
supportsFloatBinaryPrecisionpublic boolean supportsFloatBinaryPrecision() - Returns:
- truewhen this Firebird version supports FLOAT(p) with binary precision.
 
 - 
supportsStatementTimeoutspublic boolean supportsStatementTimeouts() - Returns:
- truewhen this Firebird version supports statement timeouts.
 
 - 
supportsNBackupWithGuidpublic boolean supportsNBackupWithGuid() - Returns:
- truewhen this Firebird version supports NBackup backup with GUID
 
 - 
supportsNBackupInPlaceRestorepublic boolean supportsNBackupInPlaceRestore() - Returns:
- truewhen this Firebird version supports NBackup in-place restore
 
 - 
supportsNBackupCleanHistorypublic boolean supportsNBackupCleanHistory() - Returns:
- truewhen this Firebird version supports NBackup clean history
 
 - 
supportInfoForpublic static FirebirdSupportInfo supportInfoFor(GDSServerVersion serverVersion) - Parameters:
- serverVersion- Server version
- Returns:
- FirebirdVersionSupport instance
 
 - 
supportInfoForpublic static FirebirdSupportInfo supportInfoFor(FbAttachment attachment) - Parameters:
- attachment- Low level attachment object
- Returns:
- FirebirdVersionSupport instance
 
 - 
supportInfoForpublic static FirebirdSupportInfo supportInfoFor(java.sql.Connection connection) - Parameters:
- connection- A database connection (NOTE:- Connectionis used, but it must be or unwrap to a- FirebirdConnection.
- Returns:
- FirebirdVersionSupport instance
- Throws:
- java.lang.IllegalArgumentException- When the provided connection is not an instance of or wrapper for- FirebirdConnection
- java.lang.IllegalStateException- When an SQLException occurs unwrapping the connection, or creating the- FirebirdSupportInfoinstance
 
 
- 
 
-