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 |
|---|---|
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.
|
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 |
supportsBigint()
Checks if BIGINT is supported.
|
boolean |
supportsBoolean() |
boolean |
supportsCancelOperation() |
boolean |
supportsCase() |
boolean |
supportsCaseSensitiveUserNames() |
boolean |
supportsComment() |
boolean |
supportsCustomExceptionMessages() |
boolean |
supportsExecuteBlock() |
boolean |
supportsFullSearchableBlobs() |
boolean |
supportsGetSetContext() |
boolean |
supportsGlobalTemporaryTables() |
boolean |
supportsIdentityColumns() |
boolean |
supportsInsertReturning()
TODO: Add methods for other RETURNING types?
|
boolean |
supportsMonitoringTables() |
boolean |
supportsNativeUserDefinedFunctions() |
boolean |
supportsNullDataType() |
boolean |
supportsPageSize(int pageSize) |
boolean |
supportsParametrizedExceptions() |
boolean |
supportsProtocol(int protocolVersion)
Checks support for protocol versions.
|
boolean |
supportsSavepoint() |
boolean |
supportsSqlUserManagement() |
boolean |
supportsTableAlias() |
boolean |
supportsUpdateReturning() |
boolean |
supportsUserAndGroupIdInUser() |
boolean |
supportsUtf8() |
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 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 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 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 supportsNativeUserDefinedFunctions()
true when UDFs (User Defined Functions) - backed by a native library - are supportedpublic boolean supportsCaseSensitiveUserNames()
true when this Firebird version supports case sensitive user names.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
FirebirdConnectionjava.lang.IllegalStateException - When an SQLException occurs unwrapping the connection, or creating
the FirebirdSupportInfo instanceCopyright © 2001-2021 Jaybird (Firebird JDBC/JCA) team. All rights reserved.