- All Implemented Interfaces:
DatabaseMetaData
,Wrapper
,FirebirdDatabaseMetaData
This class is internal API of Jaybird. Future versions may radically change, move, or make inaccessible this type.
For the public API, refer to the DatabaseMetaData
and FirebirdDatabaseMetaData
interfaces.
- Author:
- David Jencks, Mark Rotteveel
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
Fields inherited from interface java.sql.DatabaseMetaData
attributeNoNulls, attributeNullable, attributeNullableUnknown, bestRowNotPseudo, bestRowPseudo, bestRowSession, bestRowTemporary, bestRowTransaction, bestRowUnknown, columnNoNulls, columnNullable, columnNullableUnknown, functionColumnIn, functionColumnInOut, functionColumnOut, functionColumnResult, functionColumnUnknown, functionNoNulls, functionNoTable, functionNullable, functionNullableUnknown, functionResultUnknown, functionReturn, functionReturnsTable, importedKeyCascade, importedKeyInitiallyDeferred, importedKeyInitiallyImmediate, importedKeyNoAction, importedKeyNotDeferrable, importedKeyRestrict, importedKeySetDefault, importedKeySetNull, procedureColumnIn, procedureColumnInOut, procedureColumnOut, procedureColumnResult, procedureColumnReturn, procedureColumnUnknown, procedureNoNulls, procedureNoResult, procedureNullable, procedureNullableUnknown, procedureResultUnknown, procedureReturnsResult, sqlStateSQL, sqlStateSQL99, sqlStateXOpen, tableIndexClustered, tableIndexHashed, tableIndexOther, tableIndexStatistic, typeNoNulls, typeNullable, typeNullableUnknown, typePredBasic, typePredChar, typePredNone, typeSearchable, versionColumnNotPseudo, versionColumnPseudo, versionColumnUnknown
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
boolean
void
close()
Closes any cached metadata statements held by this database metadata implementation.boolean
boolean
boolean
deletesAreDetected
(int type) boolean
protected ResultSet
Execute an SQL query with a given set of parameters.protected ResultSet
Execute an SQL query with a given set of parameters.static String
escapeWildcards
(String objectName) Escapes the like wildcards and escape (\_%
in the provided search string with a\
.boolean
getAttributes
(String catalog, String schemaPattern, String typeNamePattern, String attributeNamePattern) getBestRowIdentifier
(String catalog, String schema, String table, int scope, boolean nullable) protected static byte[]
getColumnPrivileges
(String catalog, String schema, String table, String columnNamePattern) getColumns
(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) int
Get the dialect of the connection.getCrossReference
(String primaryCatalog, String primarySchema, String primaryTable, String foreignCatalog, String foreignSchema, String foreignTable) int
Get the dialect of the database.int
int
protected DbMetadataMediator
int
int
int
getExportedKeys
(String catalog, String schema, String table) getFunctionColumns
(String catalog, String schemaPattern, String functionNamePattern, String columnNamePattern) getFunctions
(String catalog, String schemaPattern, String functionNamePattern) getImportedKeys
(String catalog, String schema, String table) getIndexInfo
(String catalog, String schema, String table, boolean unique, boolean approximate) int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
The default maximum identifier length.int
int
int
int
int
int
int
int
int
Get the major version of the ODS (On-Disk Structure) of the database.int
Get the minor version of the ODS (On-Disk Structure) of the database.getPrimaryKeys
(String catalog, String schema, String table) getProcedureColumns
(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) getProcedures
(String catalog, String schemaPattern, String procedureNamePattern) getProcedureSourceCode
(String procedureName) Get the source of a stored procedure.getPseudoColumns
(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) int
getSchemas
(String catalog, String schemaPattern) int
getSuperTables
(String catalog, String schemaPattern, String tableNamePattern) getSuperTypes
(String catalog, String schemaPattern, String tableNamePattern) getTablePrivileges
(String catalog, String schemaPattern, String tableNamePattern) String[]
Supported table type names.getTriggerSourceCode
(String triggerName) Get the source of a trigger.getURL()
getVersionColumns
(String catalog, String schema, String table) getViewSourceCode
(String viewName) Get the source of a view.boolean
insertsAreDetected
(int type) boolean
boolean
boolean
isWrapperFor
(Class<?> iface) boolean
boolean
boolean
boolean
boolean
boolean
boolean
othersDeletesAreVisible
(int type) boolean
othersInsertsAreVisible
(int type) boolean
othersUpdatesAreVisible
(int type) boolean
ownDeletesAreVisible
(int type) boolean
ownInsertsAreVisible
(int type) boolean
ownUpdatesAreVisible
(int type) boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
supportsConvert
(int fromType, int toType) boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
supportsResultSetConcurrency
(int type, int concurrency) boolean
supportsResultSetHoldability
(int holdability) boolean
supportsResultSetType
(int type) boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
supportsTransactionIsolationLevel
(int level) boolean
boolean
boolean
<T> T
boolean
updatesAreDetected
(int type) boolean
boolean
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.sql.DatabaseMetaData
getMaxLogicalLobSize, supportsRefCursors, supportsSharding
-
Field Details
-
TABLE
- See Also:
-
SYSTEM_TABLE
- See Also:
-
VIEW
- See Also:
-
GLOBAL_TEMPORARY
- See Also:
-
-
Constructor Details
-
FBDatabaseMetaData
- Throws:
SQLException
-
-
Method Details
-
close
public void close()Description copied from interface:FirebirdDatabaseMetaData
Closes any cached metadata statements held by this database metadata implementation.The database metadata object itself remains usable. Exceptions during statement close are logged and suppressed.
- Specified by:
close
in interfaceFirebirdDatabaseMetaData
-
allProceduresAreCallable
- Specified by:
allProceduresAreCallable
in interfaceDatabaseMetaData
- Throws:
SQLException
-
allTablesAreSelectable
- Specified by:
allTablesAreSelectable
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getURL
- Specified by:
getURL
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getUserName
- Specified by:
getUserName
in interfaceDatabaseMetaData
- Throws:
SQLException
-
isReadOnly
- Specified by:
isReadOnly
in interfaceDatabaseMetaData
- Throws:
SQLException
-
nullsAreSortedHigh
- Specified by:
nullsAreSortedHigh
in interfaceDatabaseMetaData
- Throws:
SQLException
-
nullsAreSortedLow
- Specified by:
nullsAreSortedLow
in interfaceDatabaseMetaData
- Throws:
SQLException
-
nullsAreSortedAtStart
- Specified by:
nullsAreSortedAtStart
in interfaceDatabaseMetaData
- Throws:
SQLException
-
nullsAreSortedAtEnd
- Specified by:
nullsAreSortedAtEnd
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getDatabaseProductName
- Specified by:
getDatabaseProductName
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getDatabaseProductVersion
- Specified by:
getDatabaseProductVersion
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getDriverName
- Specified by:
getDriverName
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getDriverVersion
- Specified by:
getDriverVersion
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getDriverMajorVersion
public int getDriverMajorVersion()- Specified by:
getDriverMajorVersion
in interfaceDatabaseMetaData
-
getDriverMinorVersion
public int getDriverMinorVersion()- Specified by:
getDriverMinorVersion
in interfaceDatabaseMetaData
-
usesLocalFiles
- Specified by:
usesLocalFiles
in interfaceDatabaseMetaData
- Throws:
SQLException
-
usesLocalFilePerTable
- Specified by:
usesLocalFilePerTable
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsMixedCaseIdentifiers
- Specified by:
supportsMixedCaseIdentifiers
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsStatementPooling
- Specified by:
supportsStatementPooling
in interfaceDatabaseMetaData
- Throws:
SQLException
-
locatorsUpdateCopy
- Specified by:
locatorsUpdateCopy
in interfaceDatabaseMetaData
- Throws:
SQLException
-
storesUpperCaseIdentifiers
- Specified by:
storesUpperCaseIdentifiers
in interfaceDatabaseMetaData
- Throws:
SQLException
-
storesLowerCaseIdentifiers
- Specified by:
storesLowerCaseIdentifiers
in interfaceDatabaseMetaData
- Throws:
SQLException
-
storesMixedCaseIdentifiers
- Specified by:
storesMixedCaseIdentifiers
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsMixedCaseQuotedIdentifiers
- Specified by:
supportsMixedCaseQuotedIdentifiers
in interfaceDatabaseMetaData
- Throws:
SQLException
-
storesUpperCaseQuotedIdentifiers
- Specified by:
storesUpperCaseQuotedIdentifiers
in interfaceDatabaseMetaData
- Throws:
SQLException
-
storesLowerCaseQuotedIdentifiers
- Specified by:
storesLowerCaseQuotedIdentifiers
in interfaceDatabaseMetaData
- Throws:
SQLException
-
storesMixedCaseQuotedIdentifiers
- Specified by:
storesMixedCaseQuotedIdentifiers
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getIdentifierQuoteString
- Specified by:
getIdentifierQuoteString
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getSQLKeywords
- Specified by:
getSQLKeywords
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getNumericFunctions
NOTE: Some of the functions listed may only work on Firebird 2.1 or higher, or when equivalent UDFs are installed.
- Specified by:
getNumericFunctions
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getStringFunctions
NOTE: Some of the functions listed may only work on Firebird 2.1 or higher, or when equivalent UDFs are installed.
- Specified by:
getStringFunctions
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getSystemFunctions
NOTE: Some of the functions listed may only work on Firebird 2.1 or higher, or when equivalent UDFs are installed.
- Specified by:
getSystemFunctions
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getTimeDateFunctions
NOTE: Some of the functions listed may only work on Firebird 2.1 or higher, or when equivalent UDFs are installed.
- Specified by:
getTimeDateFunctions
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getSearchStringEscape
- Specified by:
getSearchStringEscape
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getExtraNameCharacters
- Specified by:
getExtraNameCharacters
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsAlterTableWithAddColumn
- Specified by:
supportsAlterTableWithAddColumn
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsAlterTableWithDropColumn
- Specified by:
supportsAlterTableWithDropColumn
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsColumnAliasing
- Specified by:
supportsColumnAliasing
in interfaceDatabaseMetaData
- Throws:
SQLException
-
nullPlusNonNullIsNull
- Specified by:
nullPlusNonNullIsNull
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsConvert
- Specified by:
supportsConvert
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsConvert
See also
org.firebirdsql.jdbc.escape.ConvertFunction
for caveats.- Specified by:
supportsConvert
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsTableCorrelationNames
- Specified by:
supportsTableCorrelationNames
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsDifferentTableCorrelationNames
- Specified by:
supportsDifferentTableCorrelationNames
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsExpressionsInOrderBy
- Specified by:
supportsExpressionsInOrderBy
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsGroupBy
- Specified by:
supportsGroupBy
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsGroupByBeyondSelect
- Specified by:
supportsGroupByBeyondSelect
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsLikeEscapeClause
- Specified by:
supportsLikeEscapeClause
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsMultipleResultSets
- Specified by:
supportsMultipleResultSets
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsMultipleTransactions
- Specified by:
supportsMultipleTransactions
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsNonNullableColumns
- Specified by:
supportsNonNullableColumns
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsMinimumSQLGrammar
- Specified by:
supportsMinimumSQLGrammar
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsCoreSQLGrammar
- Specified by:
supportsCoreSQLGrammar
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsExtendedSQLGrammar
- Specified by:
supportsExtendedSQLGrammar
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsANSI92EntryLevelSQL
- Specified by:
supportsANSI92EntryLevelSQL
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsANSI92IntermediateSQL
- Specified by:
supportsANSI92IntermediateSQL
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsANSI92FullSQL
- Specified by:
supportsANSI92FullSQL
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsIntegrityEnhancementFacility
- Specified by:
supportsIntegrityEnhancementFacility
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsOuterJoins
- Specified by:
supportsOuterJoins
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsFullOuterJoins
- Specified by:
supportsFullOuterJoins
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsLimitedOuterJoins
- Specified by:
supportsLimitedOuterJoins
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getSchemaTerm
- Specified by:
getSchemaTerm
in interfaceDatabaseMetaData
- Returns:
- the vendor term, always
null
because schemas are not supported by database server (see JDBC CTS for details). - Throws:
SQLException
-
getProcedureTerm
- Specified by:
getProcedureTerm
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getCatalogTerm
- Specified by:
getCatalogTerm
in interfaceDatabaseMetaData
- Returns:
- the vendor term for catalog, normally
null
because catalogs are not supported by database server (see JDBC CTS for details), or"PACKAGE"
whenuseCatalogAsPackage = true
and packages are supported. - Throws:
SQLException
-
isCatalogAtStart
Will report
true
whenuseCatalogAsPackage = true
and packages are supported.- Specified by:
isCatalogAtStart
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getCatalogSeparator
- Specified by:
getCatalogSeparator
in interfaceDatabaseMetaData
- Returns:
- the separator string, always
null
because catalogs are not supported by database server (see JDBC CTS for details), or"."
whenuseCatalogAsPackage = true
and packages are supported. - Throws:
SQLException
-
supportsSchemasInDataManipulation
- Specified by:
supportsSchemasInDataManipulation
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsSchemasInProcedureCalls
- Specified by:
supportsSchemasInProcedureCalls
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsSchemasInTableDefinitions
- Specified by:
supportsSchemasInTableDefinitions
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsSchemasInIndexDefinitions
- Specified by:
supportsSchemasInIndexDefinitions
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsSchemasInPrivilegeDefinitions
- Specified by:
supportsSchemasInPrivilegeDefinitions
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsCatalogsInDataManipulation
Will report
true
whenuseCatalogAsPackage = true
and packages are supported.- Specified by:
supportsCatalogsInDataManipulation
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsCatalogsInProcedureCalls
Will report
true
whenuseCatalogAsPackage = true
and packages are supported.- Specified by:
supportsCatalogsInProcedureCalls
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsCatalogsInTableDefinitions
- Specified by:
supportsCatalogsInTableDefinitions
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsCatalogsInIndexDefinitions
- Specified by:
supportsCatalogsInIndexDefinitions
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsCatalogsInPrivilegeDefinitions
- Specified by:
supportsCatalogsInPrivilegeDefinitions
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsPositionedDelete
- Specified by:
supportsPositionedDelete
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsPositionedUpdate
- Specified by:
supportsPositionedUpdate
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsSelectForUpdate
- Specified by:
supportsSelectForUpdate
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsStoredProcedures
- Specified by:
supportsStoredProcedures
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsSubqueriesInComparisons
- Specified by:
supportsSubqueriesInComparisons
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsSubqueriesInExists
- Specified by:
supportsSubqueriesInExists
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsSubqueriesInIns
- Specified by:
supportsSubqueriesInIns
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsSubqueriesInQuantifieds
- Specified by:
supportsSubqueriesInQuantifieds
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsUnion
- Specified by:
supportsUnion
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsUnionAll
- Specified by:
supportsUnionAll
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsOpenCursorsAcrossCommit
- Specified by:
supportsOpenCursorsAcrossCommit
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsOpenCursorsAcrossRollback
- Specified by:
supportsOpenCursorsAcrossRollback
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsOpenStatementsAcrossCommit
- Specified by:
supportsOpenStatementsAcrossCommit
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsOpenStatementsAcrossRollback
- Specified by:
supportsOpenStatementsAcrossRollback
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getMaxBinaryLiteralLength
- Specified by:
getMaxBinaryLiteralLength
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getMaxCharLiteralLength
- Specified by:
getMaxCharLiteralLength
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getMaxColumnNameLength
NOTE: This method reports the standard maximum length, and does not take into account restrictions configured through
MaxIdentifierByteLength
orMaxIdentifierCharLength
.- Specified by:
getMaxColumnNameLength
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getMaxObjectNameLength
public int getMaxObjectNameLength()Description copied from interface:FirebirdDatabaseMetaData
The default maximum identifier length.NOTE: This method reports the standard maximum length, and does not take into account restrictions configured through
MaxIdentifierByteLength
orMaxIdentifierCharLength
.- Specified by:
getMaxObjectNameLength
in interfaceFirebirdDatabaseMetaData
- Returns:
- the (default) maximum identifier length
-
getMaxColumnsInGroupBy
- Specified by:
getMaxColumnsInGroupBy
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getMaxColumnsInIndex
- Specified by:
getMaxColumnsInIndex
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getMaxColumnsInOrderBy
- Specified by:
getMaxColumnsInOrderBy
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getMaxColumnsInSelect
- Specified by:
getMaxColumnsInSelect
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getMaxColumnsInTable
- Specified by:
getMaxColumnsInTable
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getMaxConnections
- Specified by:
getMaxConnections
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getMaxCursorNameLength
- Specified by:
getMaxCursorNameLength
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getMaxIndexLength
- Specified by:
getMaxIndexLength
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getMaxSchemaNameLength
- Specified by:
getMaxSchemaNameLength
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getMaxProcedureNameLength
NOTE: This method reports the standard maximum length, and does not take into account restrictions configured through
MaxIdentifierByteLength
orMaxIdentifierCharLength
.- Specified by:
getMaxProcedureNameLength
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getMaxCatalogNameLength
Will normally report
0
, but non-zero whenuseCatalogAsPackage = true
and packages are supported.- Specified by:
getMaxCatalogNameLength
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getMaxRowSize
- Specified by:
getMaxRowSize
in interfaceDatabaseMetaData
- Throws:
SQLException
-
doesMaxRowSizeIncludeBlobs
- Specified by:
doesMaxRowSizeIncludeBlobs
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getMaxStatementLength
- Specified by:
getMaxStatementLength
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getMaxStatements
- Specified by:
getMaxStatements
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getMaxTableNameLength
NOTE: This method reports the standard maximum length, and does not take into account restrictions configured through
MaxIdentifierByteLength
orMaxIdentifierCharLength
.- Specified by:
getMaxTableNameLength
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getMaxTablesInSelect
- Specified by:
getMaxTablesInSelect
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getMaxUserNameLength
NOTE: This method reports the standard maximum length, and does not take into account restrictions configured through
MaxIdentifierByteLength
orMaxIdentifierCharLength
.- Specified by:
getMaxUserNameLength
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getDefaultTransactionIsolation
- Specified by:
getDefaultTransactionIsolation
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsTransactions
- Specified by:
supportsTransactions
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsTransactionIsolationLevel
- Specified by:
supportsTransactionIsolationLevel
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsDataDefinitionAndDataManipulationTransactions
Although Firebird supports both DML and DDL in transactions, it is not possible to use objects in the same transaction that defines them. For example, it is not possible to insert into a table in the same transaction that created it.
- Specified by:
supportsDataDefinitionAndDataManipulationTransactions
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsDataManipulationTransactionsOnly
- Specified by:
supportsDataManipulationTransactionsOnly
in interfaceDatabaseMetaData
- Throws:
SQLException
-
dataDefinitionCausesTransactionCommit
Read the note on
supportsDataDefinitionAndDataManipulationTransactions()
.- Specified by:
dataDefinitionCausesTransactionCommit
in interfaceDatabaseMetaData
- Throws:
SQLException
-
dataDefinitionIgnoredInTransactions
Read the note on
supportsDataDefinitionAndDataManipulationTransactions()
.- Specified by:
dataDefinitionIgnoredInTransactions
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getProcedures
public ResultSet getProcedures(String catalog, String schemaPattern, String procedureNamePattern) throws SQLException By default, this method does not return procedures defined in packages. To also return procedures in packages, set connection property
useCatalogAsPackage
totrue
. When enabled, this method has the following differences in behaviour:- The
catalog
parameter will return normal and packaged procedures whennull
, only normal (non-packaged) procedures when empty string (""
), and procedures from a specific package (exact case-sensitive match!) for other non-null
values - Column
PROCEDURE_CAT
for normal procedures is empty string (""
) instead ofnull
, for packaged procedures it is the package name - Column
SPECIFIC_NAME
for packaged procedures will report<quoted-package-name>.<quoted-procedure-name>
(normal procedures will report the same as columnPROCEDURE_NAME
, the unquoted name)
- Specified by:
getProcedures
in interfaceDatabaseMetaData
- Throws:
SQLException
- The
-
getProcedureColumns
public ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) throws SQLException By default, this method does not return columns of procedures defined in packages. To also return columns of procedures in packages, set connection property
useCatalogAsPackage
totrue
. When enabled, this method has the following differences in behaviour:- The
catalog
parameter will return normal and packaged procedures whennull
, only normal (non-packaged) procedures when empty string (""
), and procedures from a specific package (exact case-sensitive match!) for other non-null
values - Column
PROCEDURE_CAT
for normal procedures is empty string (""
) instead ofnull
, for packaged procedures it is the package name - Column
SPECIFIC_NAME
for packaged procedures will report<quoted-package-name>.<quoted-procedure-name>
(normal procedures will report the same as columnPROCEDURE_NAME
, the unquoted name)
- Specified by:
getProcedureColumns
in interfaceDatabaseMetaData
- Throws:
SQLException
- The
-
getTables
public ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) throws SQLException Jaybird defines these additional columns:
- OWNER_NAME String => Owner of the table
- JB_RELATION_ID Short => Value of
RDB$RELATIONS.RDB$RELATION_ID
of the table
- Specified by:
getTables
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getSchemas
- Specified by:
getSchemas
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getCatalogs
When
>useCatalogAsPackage = true
and packages are supported, this method will return the package names in columnTABLE_CAT
.- Specified by:
getCatalogs
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getTableTypes
- Specified by:
getTableTypes
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getTableTypeNames
Description copied from interface:FirebirdDatabaseMetaData
Supported table type names.- Specified by:
getTableTypeNames
in interfaceFirebirdDatabaseMetaData
- Returns:
- An array with the supported table types names for
DatabaseMetaData.getTables(String, String, String, String[])
- Throws:
SQLException
- For problems determining supported table types- See Also:
-
getColumns
public ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) throws SQLException Jaybird defines these additional columns:
- JB_IS_IDENTITY String => Indicates whether this column is an identity column (NOTE: Jaybird
specific column; retrieve by name!).
There is a subtle difference with the meaning of
IS_AUTOINCREMENT
. This column indicates if the column is a true identity column.- YES --- if the column is an identity column
- NO --- if the column is not an identity column
- JB_IDENTITY_TYPE String => Type of identity column (NOTE: Jaybird specific column; retrieve by
name!)
- ALWAYS --- for a GENERATED ALWAYS AS IDENTITY column (not yet supported in Firebird 3!)
- BY DEFAULT --- for a GENERATED BY DEFAULT AS IDENTITY column
- null --- if the column is not an identity type (or the identity type is unknown)
- Specified by:
getColumns
in interfaceDatabaseMetaData
- Throws:
SQLException
- JB_IS_IDENTITY String => Indicates whether this column is an identity column (NOTE: Jaybird
specific column; retrieve by name!).
There is a subtle difference with the meaning of
-
getColumnPrivileges
public ResultSet getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern) throws SQLException Jaybird defines an additional column:
- JB_GRANTEE_TYPE String => Object type of
GRANTEE
(NOTE: Jaybird specific column; retrieve by name!).
Privileges granted to the table as a whole are reported for each individual column.
NOTE: This implementation returns all privileges, not just applicable to the current user. It is unclear if this complies with the JDBC requirements. This may change in the future to only return only privileges applicable to the current user, user
PUBLIC
and — maybe — active roles.- Specified by:
getColumnPrivileges
in interfaceDatabaseMetaData
- Throws:
SQLException
- JB_GRANTEE_TYPE String => Object type of
-
getTablePrivileges
public ResultSet getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern) throws SQLException Jaybird defines an additional column:
- JB_GRANTEE_TYPE String => Object type of
GRANTEE
(NOTE: Jaybird specific column; retrieve by name!).
NOTE: This implementation returns all privileges, not just applicable to the current user. It is unclear if this complies with the JDBC requirements. This may change in the future to only return only privileges applicable to the current user, user
PUBLIC
and — maybe — active roles.- Specified by:
getTablePrivileges
in interfaceDatabaseMetaData
- Throws:
SQLException
- JB_GRANTEE_TYPE String => Object type of
-
getBestRowIdentifier
public ResultSet getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable) throws SQLException Jaybird considers the primary key (scoped as
bestRowSession
as the best identifier for all scopes. Pseudo columnRDB$DB_KEY
(scoped asbestRowTransaction
is considered the second-best alternative for scopesbestRowTemporary
andbestRowTransaction
iftable
has no primary key.Jaybird currently considers
RDB$DB_KEY
to beDatabaseMetaData.bestRowTransaction
even if the dbkey_scope is set to 1 (session). This may change in the future. See alsogetRowIdLifetime()
.- Specified by:
getBestRowIdentifier
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getVersionColumns
Jaybird considers both
RDB$DB_KEY
andRDB$RECORD_VERSION
(Firebird 3 and higher) as version columns.Jaybird only returns pseudo-column as version columns, so 'last updated' columns updated by a trigger, calculated columns, or other forms of change tracking are not reported by this method.
- Specified by:
getVersionColumns
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getPrimaryKeys
Jaybird defines these additional columns:
- JB_PK_INDEX_NAME String => Index backing the primary key
- Specified by:
getPrimaryKeys
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getImportedKeys
Jaybird defines these additional columns:
- JB_FK_INDEX_NAME String => Index backing the foreign key
- JB_PK_INDEX_NAME String => Index backing the primary key
- Specified by:
getImportedKeys
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getExportedKeys
Jaybird defines these additional columns:
- JB_FK_INDEX_NAME String => Index backing the foreign key
- JB_PK_INDEX_NAME String => Index backing the primary key
- Specified by:
getExportedKeys
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getCrossReference
public ResultSet getCrossReference(String primaryCatalog, String primarySchema, String primaryTable, String foreignCatalog, String foreignSchema, String foreignTable) throws SQLException Jaybird defines these additional columns:
- JB_FK_INDEX_NAME String => Index backing the foreign key
- JB_PK_INDEX_NAME String => Index backing the primary key
- Specified by:
getCrossReference
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getTypeInfo
- Specified by:
getTypeInfo
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getIndexInfo
public ResultSet getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate) throws SQLException Implementation note: The value of
FILTER_CONDITION
is populated with the value ofRDB$INDICES.RDB$CONDITION_SOURCE
, which includes theWHERE
keyword and comments before theWHERE
keyword. This is an implementation detail which may change in the future. That is, Jaybird may change in the future to only include the condition itself, not theWHERE
keyword, and/or may remove some or all comments.- Specified by:
getIndexInfo
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsResultSetType
- Specified by:
supportsResultSetType
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsResultSetConcurrency
- Specified by:
supportsResultSetConcurrency
in interfaceDatabaseMetaData
- Throws:
SQLException
-
ownUpdatesAreVisible
- Specified by:
ownUpdatesAreVisible
in interfaceDatabaseMetaData
- Throws:
SQLException
-
ownDeletesAreVisible
- Specified by:
ownDeletesAreVisible
in interfaceDatabaseMetaData
- Throws:
SQLException
-
ownInsertsAreVisible
- Specified by:
ownInsertsAreVisible
in interfaceDatabaseMetaData
- Throws:
SQLException
-
othersUpdatesAreVisible
- Specified by:
othersUpdatesAreVisible
in interfaceDatabaseMetaData
- Throws:
SQLException
-
othersDeletesAreVisible
- Specified by:
othersDeletesAreVisible
in interfaceDatabaseMetaData
- Throws:
SQLException
-
othersInsertsAreVisible
- Specified by:
othersInsertsAreVisible
in interfaceDatabaseMetaData
- Throws:
SQLException
-
updatesAreDetected
- Specified by:
updatesAreDetected
in interfaceDatabaseMetaData
- Throws:
SQLException
-
deletesAreDetected
- Specified by:
deletesAreDetected
in interfaceDatabaseMetaData
- Throws:
SQLException
-
insertsAreDetected
- Specified by:
insertsAreDetected
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsBatchUpdates
- Specified by:
supportsBatchUpdates
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getUDTs
public ResultSet getUDTs(String catalog, String schemaPattern, String typeNamePattern, int[] types) throws SQLException UDTs are not supported by Firebird. This method will always return an empty ResultSet.
- Specified by:
getUDTs
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getConnection
- Specified by:
getConnection
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getAttributes
public ResultSet getAttributes(String catalog, String schemaPattern, String typeNamePattern, String attributeNamePattern) throws SQLException UDTs are not supported by Firebird. This method will always return an empty ResultSet.
- Specified by:
getAttributes
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsSavepoints
- Specified by:
supportsSavepoints
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsNamedParameters
- Specified by:
supportsNamedParameters
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsMultipleOpenResults
- Specified by:
supportsMultipleOpenResults
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsGetGeneratedKeys
- Specified by:
supportsGetGeneratedKeys
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getSuperTypes
public ResultSet getSuperTypes(String catalog, String schemaPattern, String tableNamePattern) throws SQLException Supertypes are not supported by Firebird. This method will always return an empty ResultSet.
- Specified by:
getSuperTypes
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getSuperTables
public ResultSet getSuperTables(String catalog, String schemaPattern, String tableNamePattern) throws SQLException Supertables are not supported by Firebird. This method will always return an empty ResultSet.
- Specified by:
getSuperTables
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsResultSetHoldability
- Specified by:
supportsResultSetHoldability
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getResultSetHoldability
- Specified by:
getResultSetHoldability
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getDatabaseMajorVersion
- Specified by:
getDatabaseMajorVersion
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getDatabaseMinorVersion
- Specified by:
getDatabaseMinorVersion
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getOdsMajorVersion
Description copied from interface:FirebirdDatabaseMetaData
Get the major version of the ODS (On-Disk Structure) of the database.- Specified by:
getOdsMajorVersion
in interfaceFirebirdDatabaseMetaData
- Returns:
- The major version number of the database itself
- Throws:
SQLException
- if a database access error occurs
-
getOdsMinorVersion
Description copied from interface:FirebirdDatabaseMetaData
Get the minor version of the ODS (On-Disk Structure) of the database.- Specified by:
getOdsMinorVersion
in interfaceFirebirdDatabaseMetaData
- Returns:
- The minor version number of the database itself
- Throws:
SQLException
- if a database access error occurs
-
getDatabaseDialect
Description copied from interface:FirebirdDatabaseMetaData
Get the dialect of the database.- Specified by:
getDatabaseDialect
in interfaceFirebirdDatabaseMetaData
- Returns:
- The dialect of the database
- Throws:
SQLException
- if a database access error occurs- See Also:
-
getConnectionDialect
Description copied from interface:FirebirdDatabaseMetaData
Get the dialect of the connection.The connection dialect may be different from the database dialect.
- Specified by:
getConnectionDialect
in interfaceFirebirdDatabaseMetaData
- Returns:
- The dialect of the connection
- Throws:
SQLException
- if a database access error occurs- See Also:
-
getSQLStateType
Firebird primarily uses SQL standard SQL states, but may occasionally use values from X/Open.
- Specified by:
getSQLStateType
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsStoredFunctionsUsingCallSyntax
- Specified by:
supportsStoredFunctionsUsingCallSyntax
in interfaceDatabaseMetaData
- Throws:
SQLException
-
autoCommitFailureClosesAllResultSets
The holdable result sets remain open, others are closed, but this happens before the statement is executed.
- Specified by:
autoCommitFailureClosesAllResultSets
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getClientInfoProperties
- Specified by:
getClientInfoProperties
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getFunctionColumns
public ResultSet getFunctionColumns(String catalog, String schemaPattern, String functionNamePattern, String columnNamePattern) throws SQLException By default, this method does not return columns of functions defined in packages. To also return columns of functions in packages, set connection property
useCatalogAsPackage
totrue
. When enabled, this method has the following differences in behaviour:- The
catalog
parameter will return normal and packaged functions whennull
, only normal (non-packaged) function when empty string (""
), and functions from a specific package (exact case-sensitive match!) for other non-null
values - Column
FUNCTION_CAT
for normal functions is empty string (""
) instead ofnull
, for packaged functions it is the package name - Column
SPECIFIC_NAME
for packaged functions will report<quoted-package-name>.<quoted-function-name>
(normal functions will report the same as columnFUNCTION_NAME
, the unquoted name)
- Specified by:
getFunctionColumns
in interfaceDatabaseMetaData
- Throws:
SQLException
- The
-
getFunctions
public ResultSet getFunctions(String catalog, String schemaPattern, String functionNamePattern) throws SQLException Jaybird defines a number of additional columns. As these are not defined in JDBC, their position may change with revisions of JDBC. We recommend to retrieve these columns by name. The following additional columns are available:
- JB_FUNCTION_SOURCE String => The source of the function (for Firebird 3+ PSQL functions only)).
- JB_FUNCTION_KIND String => The kind of function, one of "UDF", "PSQL" (Firebird 3+) or "UDR" (Firebird 3+)
- JB_MODULE_NAME String => Value of
RDB$MODULE_NAME
(isnull
for PSQL) - JB_ENTRYPOINT String => Value of
RDB$ENTRYPOINT
(isnull
for PSQL) - JB_ENGINE_NAME String => Value of
RDB$ENGINE_NAME
(isnull
for UDF and PSQL)
By default, this method does not return functions defined in packages. To also return functions in packages, set connection property
useCatalogAsPackage
totrue
. When enabled, this method has the following differences in behaviour:- The
catalog
parameter will return normal and packaged functions whennull
, only normal (non-packaged) function when empty string (""
), and functions from a specific package (exact case-sensitive match!) for other non-null
values - Column
FUNCTION_CAT
for normal functions is empty string (""
) instead ofnull
, for packaged functions it is the package name - Column
SPECIFIC_NAME
for packaged functions will report<quoted-package-name>.<quoted-function-name>
(normal functions will report the same as columnFUNCTION_NAME
, the unquoted name)
- Specified by:
getFunctions
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getSchemas
- Specified by:
getSchemas
in interfaceDatabaseMetaData
- Throws:
SQLException
-
isWrapperFor
- Specified by:
isWrapperFor
in interfaceWrapper
- Throws:
SQLException
-
unwrap
- Specified by:
unwrap
in interfaceWrapper
- Throws:
SQLException
-
escapeWildcards
Escapes the like wildcards and escape (\_%
in the provided search string with a\
.Primary purpose is to escape object names with wildcards for use in metadata patterns for literal matches, but it can also be used to escape for SQL
LIKE
.- Parameters:
objectName
- Object name to escape.- Returns:
- Object name with wildcards escaped.
-
getPseudoColumns
public ResultSet getPseudoColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) throws SQLException - Specified by:
getPseudoColumns
in interfaceDatabaseMetaData
- Throws:
SQLException
-
generatedKeyAlwaysReturned
- Specified by:
generatedKeyAlwaysReturned
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getProcedureSourceCode
Description copied from interface:FirebirdDatabaseMetaData
Get the source of a stored procedure.- Specified by:
getProcedureSourceCode
in interfaceFirebirdDatabaseMetaData
- Parameters:
procedureName
- name of the stored procedure.- Returns:
- source of the stored procedure.
- Throws:
SQLException
- if specified procedure cannot be found.
-
getTriggerSourceCode
Description copied from interface:FirebirdDatabaseMetaData
Get the source of a trigger.- Specified by:
getTriggerSourceCode
in interfaceFirebirdDatabaseMetaData
- Parameters:
triggerName
- name of the trigger.- Returns:
- source of the trigger.
- Throws:
SQLException
- if specified trigger cannot be found.
-
getViewSourceCode
Description copied from interface:FirebirdDatabaseMetaData
Get the source of a view.- Specified by:
getViewSourceCode
in interfaceFirebirdDatabaseMetaData
- Parameters:
viewName
- name of the view.- Returns:
- source of the view.
- Throws:
SQLException
- if specified view cannot be found.
-
getBytes
-
doQuery
Execute an SQL query with a given set of parameters.- Parameters:
sql
- The sql statement to be used for the queryparams
- The parameters to be used in the query- Throws:
SQLException
- if a database access error occurs
-
doQuery
protected ResultSet doQuery(String sql, List<String> params, boolean standalone) throws SQLException Execute an SQL query with a given set of parameters.- Parameters:
sql
- The sql statement to be used for the queryparams
- The parameters to be used in the querystandalone
- The query to be executed is a standalone query (should not be cached and be closed asap)- Throws:
SQLException
- if a database access error occurs
-
getRowIdLifetime
Minimum lifetime supported by Firebird is transaction-scope, and this can be changed to session-scope with
isc_dpb_dbkey_scope
set to1
(eg connection propertydbkey_scope=1
). This implementation, however, will always reportRowIdLifetime.ROWID_VALID_TRANSACTION
.- Specified by:
getRowIdLifetime
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getJDBCMajorVersion
public int getJDBCMajorVersion()- Specified by:
getJDBCMajorVersion
in interfaceDatabaseMetaData
-
getJDBCMinorVersion
public int getJDBCMinorVersion()- Specified by:
getJDBCMinorVersion
in interfaceDatabaseMetaData
-
getDbMetadataMediator
-