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.
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 false
public 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 supportsMultiRowReturning()
true
when RETURNING
supports multiple rows, false
only singleton resultspublic 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 (e.g. 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 supportsWireCryptArc4()
public boolean supportsWireCryptChaCha()
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 usernames.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 ZONE
public 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 supportsStatementUnprepare()
true
when this Firebird version supports statement unprepare (DSQL_unprepare
)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 supportsNBackupFixup()
true
when this Firebird version supports NBackup fixuppublic boolean supportsNBackupPreserveSequence()
true
when this Firebird version supports NBackup preserve sequencepublic boolean supportsNBackupCleanHistory()
true
when this Firebird version supports NBackup clean historypublic boolean supportsScrollableCursors()
true
when 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))public boolean supportsServerBatch()
true
when 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))public boolean supportsCustomSecurityDb()
true
when this Firebird version supports custom security databasespublic boolean supportsWnet()
public boolean supportsStatementTextLongerThan64K()
true
when this Firebird version supports statement texts longer than 64KBpublic boolean supportsParallelWorkers()
true
when this Firebird version supports parallel workerspublic boolean supportsRDB$CONFIG()
true
when this Firebird version has the RDB$CONFIG
tablepublic boolean supportsUpgradeOds()
true
if the gfix/service repair option upgrade ODS is supportedpublic boolean supportsFixIcu()
true
if the gfix/service repair option icu (fix ICU) is supportedpublic boolean hasProcedureTypeColumn()
true
if the default ODS of this Firebird version has column RDB$PROCEDURE_TYPE
public boolean isWindows()
public 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
FirebirdConnection
java.lang.IllegalStateException
- When an SQLException occurs unwrapping the connection, or creating
the FirebirdSupportInfo
instanceCopyright © 2001-2024 Jaybird (Firebird JDBC) team. All rights reserved.