public final class FirebirdSupportInfo
extends java.lang.Object
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.
| Modifier and Type | Method and Description |
|---|---|
int |
getSystemTableCount()
The number of system tables (including monitoring tables).
|
boolean |
isVersionBelow(int majorVersion,
int minorVersion)
Check if the major.minor of this version is below the specified version.
|
boolean |
isVersionEqualOrAbove(int majorVersion,
int minorVersion)
Check if the major.minor of this version is equal to or larger than the specified version.
|
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.
|
int |
maxDecimalPrecision() |
int |
maxIdentifierLengthBytes() |
int |
maxIdentifierLengthCharacters() |
int |
maxReportedIdentifierLengthBytes() |
int |
reportedMetadataCharacterSetId() |
boolean |
reportsBlobCharSetInDescriptor() |
boolean |
reportsByteLengthInDescriptor()
TODO: Check if this is for all types or only for metadata.
|
static FirebirdSupportInfo |
supportInfoFor(java.sql.Connection connection) |
static FirebirdSupportInfo |
supportInfoFor(FbAttachment attachment) |
static FirebirdSupportInfo |
supportInfoFor(GDSServerVersion serverVersion) |
boolean |
supportsAuthenticationPlugin(java.lang.String pluginName)
Checks whether the Firebird version supports a plugin name.
|
boolean |
supportsBigint()
Checks if BIGINT is supported.
|
boolean |
supportsBoolean() |
boolean |
supportsCancelOperation() |
boolean |
supportsCase() |
boolean |
supportsCaseSensitiveUserNames() |
boolean |
supportsComment() |
boolean |
supportsCustomExceptionMessages() |
boolean |
supportsDecfloat() |
boolean |
supportsDecimalPrecision(int precision)
Support for decimal (and numeric) precision.
|
boolean |
supportsExecuteBlock() |
boolean |
supportsExplainedExecutionPlan() |
boolean |
supportsFloatBinaryPrecision() |
boolean |
supportsFullSearchableBlobs() |
boolean |
supportsGetSetContext() |
boolean |
supportsGlobalTemporaryTables() |
boolean |
supportsIdentityColumns() |
boolean |
supportsInsertReturning()
TODO: Add methods for other RETURNING types?
|
boolean |
supportsInt128() |
boolean |
supportsMonitoringTables() |
boolean |
supportsNativeUserDefinedFunctions() |
boolean |
supportsNBackupCleanHistory() |
boolean |
supportsNBackupInPlaceRestore() |
boolean |
supportsNBackupWithGuid() |
boolean |
supportsNullDataType() |
boolean |
supportsPackages() |
boolean |
supportsPageSize(int pageSize) |
boolean |
supportsParametrizedExceptions() |
boolean |
supportsProtocol(int protocolVersion)
Checks support for protocol versions.
|
boolean |
supportsPsqlFunctions() |
boolean |
supportsRecordVersionPseudoColumn() |
boolean |
supportsReturningAll() |
boolean |
supportsSavepoint() |
boolean |
supportsSqlUserManagement() |
boolean |
supportsStatementTimeouts() |
boolean |
supportsTableAlias() |
boolean |
supportsTimeZones() |
boolean |
supportsUpdateReturning() |
boolean |
supportsUserAndGroupIdInUser() |
boolean |
supportsUtf8() |
boolean |
supportsWireCompression() |
boolean |
supportsWireEncryption() |
public boolean isVersionEqualOrAbove(int majorVersion,
int minorVersion)
majorVersion - Major versionminorVersion - Minor versiontrue when current major is larger than required, or major is same and minor is equal to or
larger than requiredpublic boolean isVersionEqualOrAbove(int requiredMajorVersion,
int requiredMinorVersion,
int requiredVariant)
requiredMajorVersion - Required major versionrequiredMinorVersion - Required minor versionrequiredVariant - Required variant versiontrue when 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 requiredpublic boolean isVersionBelow(int majorVersion,
int minorVersion)
Equivalent to !isVersionEqualOrAbove(majorVersion, minorVersion).
majorVersion - Major versionminorVersion - Minor versiontrue when current major is smaller than the specified major, or major is same and minor is
smaller than the specified minorpublic boolean supportsBigint()
Low level this feature was added in Interbase 6.0 / Firebird 1.0, but it was never surfaced in DDL
true when the data type BIGINT is supportedpublic boolean supportsBoolean()
true when the data type BOOLEAN is supportedpublic boolean supportsDecfloat()
true when the data type DECFLOAT is supportedpublic boolean supportsDecimalPrecision(int precision)
precision - Precisiontrue when DECIMAL (and NUMERIC) support the supplied precision; 0 or negative precision always
return falsepublic int maxDecimalPrecision()
public boolean supportsInt128()
true when the data type INT128 is supportedpublic boolean supportsComment()
true when the COMMENT statement is supportedpublic boolean supportsGetSetContext()
true when RDB$GET_CONTEXT and RDB$SET_CONTEXT are supportedpublic boolean supportsCase()
true when CASE (simple or searched) is supportedpublic boolean reportsBlobCharSetInDescriptor()
true when the blob character set is reported in the scale of the field descriptorpublic boolean reportsByteLengthInDescriptor()
true when the length of the field descriptor reports the byte length (max byte per char *
char length)public boolean supportsInsertReturning()
true when INSERT ... RETURNING ... is supportedpublic boolean supportsUpdateReturning()
true when UPDATE ... RETURNING ... is supportedpublic boolean supportsReturningAll()
true when RETURNING * and RETURNING ref.* is supported.public boolean supportsUtf8()
true when the server knows the UTF8 character set (NOTE: For firebird 1.5 it is an alias for
UNICODE_FSS)public boolean supportsSavepoint()
true when SAVEPOINT is supportedpublic boolean supportsExecuteBlock()
true when EXECUTE BLOCK is supportedpublic boolean supportsSqlUserManagement()
true when CREATE/ALTER/DROP USER is supportedpublic boolean supportsCancelOperation()
true when fb_cancel_operation is supportedpublic boolean supportsTableAlias()
true when field descriptors contain table alias informationpublic boolean supportsNullDataType()
true when the NULL data type and ? IS NULL is supportedpublic boolean supportsUserAndGroupIdInUser()
true when isc_spb_sec_userid and isc_spb_sec_groupid are supported.public boolean supportsProtocol(int protocolVersion)
protocolVersion - Protocol version numbertrue when the database supports the specified protocolpublic boolean supportsCustomExceptionMessages()
true when custom exception messages are supported.public boolean supportsParametrizedExceptions()
true when parametrized exceptions are supported.public boolean supportsMonitoringTables()
true when monitoring tables are supported.public boolean supportsGlobalTemporaryTables()
true when global temporary tables (GTTs) are supported.public boolean supportsFullSearchableBlobs()
true when blobs are fully searchable (eg using `LIKE`).public boolean supportsIdentityColumns()
true when identity columns are supported.public int maxIdentifierLengthCharacters()
public int maxIdentifierLengthBytes()
maxReportedIdentifierLengthBytes()public int maxReportedIdentifierLengthBytes()
maxIdentifierLengthBytes()public int reportedMetadataCharacterSetId()
public boolean supportsPageSize(int pageSize)
public boolean supportsWireEncryption()
public boolean supportsWireCompression()
true when zlib wire compression is supportedpublic boolean supportsNativeUserDefinedFunctions()
true when UDFs (User Defined Functions) - backed by a native library - are supportedpublic boolean supportsPsqlFunctions()
true when PSQL functions are supportedpublic boolean supportsAuthenticationPlugin(java.lang.String pluginName)
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.
pluginName - Authentication plugin name (case-sensitive)true if supported, false otherwise.public boolean supportsRecordVersionPseudoColumn()
true when RDB$RECORD_VERSION pseudo column is supportedpublic int getSystemTableCount()
-1 if the Firebird version is not known/supported.public boolean supportsCaseSensitiveUserNames()
true when this Firebird version supports case sensitive user names.public boolean supportsExplainedExecutionPlan()
true when this Firebird version supports explained (detailed) execution plans.public boolean supportsTimeZones()
true when this Firebird version supports TIME(STAMP) WITH TIME ZONEpublic boolean supportsPackages()
true when this Firebird version supports packages.public boolean supportsFloatBinaryPrecision()
true when this Firebird version supports FLOAT(p) with binary precision.public boolean supportsStatementTimeouts()
true when this Firebird version supports statement timeouts.public boolean supportsNBackupWithGuid()
true when this Firebird version supports NBackup backup with GUIDpublic boolean supportsNBackupInPlaceRestore()
true when this Firebird version supports NBackup in-place restorepublic boolean supportsNBackupCleanHistory()
true when this Firebird version supports NBackup clean historypublic static FirebirdSupportInfo supportInfoFor(GDSServerVersion serverVersion)
serverVersion - Server versionpublic static FirebirdSupportInfo supportInfoFor(FbAttachment attachment)
attachment - Low level attachment objectpublic static FirebirdSupportInfo supportInfoFor(java.sql.Connection connection)
connection - A database connection (NOTE: Connection is used, but it must be or unwrap to a
FirebirdConnection.java.lang.IllegalArgumentException - When the provided connection is not an instance of or wrapper for
FirebirdConnectionjava.lang.IllegalStateException - When an SQLException occurs unwrapping the connection, or creating
the FirebirdSupportInfo instanceCopyright © 2001-2023 Jaybird (Firebird JDBC/JCA) team. All rights reserved.