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 Summary
 
- 
- 
- 
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.
 
 - 
supportsMultiRowReturningpublic boolean supportsMultiRowReturning() - Returns:
- truewhen- RETURNINGsupports multiple rows,- falseonly singleton results
 
 - 
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-16 and 18-19 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 (e.g. 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() 
 - 
supportsWireCryptArc4public boolean supportsWireCryptArc4() 
 - 
supportsWireCryptChaChapublic boolean supportsWireCryptChaCha() 
 - 
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 usernames.
 
 - 
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.
 
 - 
supportsStatementUnpreparepublic boolean supportsStatementUnprepare() - Returns:
- truewhen this Firebird version supports statement unprepare (- DSQL_unprepare)
 
 - 
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
 
 - 
supportsNBackupFixuppublic boolean supportsNBackupFixup() - Returns:
- truewhen this Firebird version supports NBackup fixup
 
 - 
supportsNBackupPreserveSequencepublic boolean supportsNBackupPreserveSequence() - Returns:
- truewhen this Firebird version supports NBackup preserve sequence
 
 - 
supportsNBackupCleanHistorypublic boolean supportsNBackupCleanHistory() - Returns:
- truewhen this Firebird version supports NBackup clean history
 
 - 
supportsScrollableCursorspublic boolean supportsScrollableCursors() - Returns:
- truewhen this Firebird version supports scrollable cursors. (NOTE: this does not mean the connection supports it, as that depends on the actual protocol (i.e. PURE_JAVA or derivative))
 
 - 
supportsServerBatchpublic boolean supportsServerBatch() - Returns:
- truewhen this Firebird version supports server-side batch updates. (NOTE: this does not mean the connection supports it, as that depends on the actual protocol (i.e. PURE_JAVA or derivative))
 
 - 
supportsCustomSecurityDbpublic boolean supportsCustomSecurityDb() - Returns:
- truewhen this Firebird version supports custom security databases
 
 - 
supportsWnetpublic boolean supportsWnet() 
 - 
supportsStatementTextLongerThan64Kpublic boolean supportsStatementTextLongerThan64K() - Returns:
- truewhen this Firebird version supports statement texts longer than 64KB
 
 - 
supportsParallelWorkerspublic boolean supportsParallelWorkers() - Returns:
- truewhen this Firebird version supports parallel workers
 
 - 
supportsRDB$CONFIGpublic boolean supportsRDB$CONFIG() - Returns:
- truewhen this Firebird version has the- RDB$CONFIGtable
 
 - 
supportsUpgradeOdspublic boolean supportsUpgradeOds() - Returns:
- trueif the gfix/service repair option upgrade ODS is supported
 
 - 
supportsFixIcupublic boolean supportsFixIcu() - Returns:
- trueif the gfix/service repair option icu (fix ICU) is supported
 
 - 
supportsPartialIndicespublic boolean supportsPartialIndices() - Returns:
- trueif partial indices are supported
 
 - 
supportsNamelessServiceManagerpublic boolean supportsNamelessServiceManager() - Returns:
- trueif the nameless service manager is supported
 
 - 
supportsOdspublic boolean supportsOds(int odsMajor, int odsMinor)- Parameters:
- odsMajor- ODS major version
- odsMinor- ODS minor version
- Returns:
- trueif the specified ODS is supported
 
 - 
supportsInlineBlobspublic boolean supportsInlineBlobs() Reports if inline blobs are supported.- Returns:
- trueif inline blobs are supported,- falseotherwise
 
 - 
hasProcedureTypeColumnpublic boolean hasProcedureTypeColumn() - Returns:
- trueif the default ODS of this Firebird version has column- RDB$PROCEDURE_TYPE
 
 - 
isWindowspublic boolean isWindows() 
 - 
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
 
 
- 
 
-