Interface JdbcMetadata


@SPI(USE) public interface JdbcMetadata

Effective JDBC metadata used for Hibernate runtime decisions.

Hibernate combines the raw ExtractedDatabaseMetaData snapshot with the Dialect's JDBC metadata override profile. Use the effective support methods on this contract for runtime decisions. Access getExtractedDatabaseMetaData() only for diagnostics, reporting, or an integration which explicitly requires the raw driver observations.

Since:
8.0
  • Method Details

    • getJdbcEnvironment

      JdbcEnvironment getJdbcEnvironment()
      The JDBC environment owning this effective metadata view.
    • isJdbcMetadataAccessible

      boolean isJdbcMetadataAccessible()
      Whether a live JDBC metadata source was available when the underlying snapshot was extracted.
    • getExtractedDatabaseMetaData

      ExtractedDatabaseMetaData getExtractedDatabaseMetaData()

      The raw driver and connection observations underlying this view.

      Do not use a raw support report as an effective runtime decision.

    • getDatabaseProductName

      String getDatabaseProductName()
      The database product name reported by the JDBC driver.
    • getDatabaseProductVersion

      String getDatabaseProductVersion()
      The database product version reported by the JDBC driver.
    • supportsSchemas

      boolean supportsSchemas()
      Whether the JDBC driver reported that schemas are supported in DML.
    • supportsCatalogs

      boolean supportsCatalogs()
      Whether the JDBC driver reported that catalogs are supported in DML.
    • getConnectionCatalogName

      String getConnectionCatalogName()
      The catalog in effect for the bootstrap connection.
    • getConnectionSchemaName

      String getConnectionSchemaName()
      The schema in effect for the bootstrap connection.
      See Also:
    • getUnquotedIdentifierCaseStrategy

      IdentifierCaseStrategy getUnquotedIdentifierCaseStrategy()
      The effective unquoted-identifier case strategy captured from JDBC metadata, or the standard fallback when metadata is unavailable.
    • getQuotedIdentifierCaseStrategy

      IdentifierCaseStrategy getQuotedIdentifierCaseStrategy()
      The effective quoted-identifier case strategy captured from JDBC metadata, or the standard fallback when metadata is unavailable.
    • getSqlKeywords

      Set<String> getSqlKeywords()
      The immutable lowercase SQL-keyword set reported by the JDBC driver.
    • supportsNamedParameters

      boolean supportsNamedParameters()

      Whether named callable parameters are effectively supported.

      Hibernate resolves the raw driver report through the named-parameter override.

      See Also:
    • supportsRefCursors

      boolean supportsRefCursors()

      Whether the standard JDBC REF_CURSOR API is effectively supported.

      This answer controls Types.REF_CURSOR registration and typed getObject(..., ResultSet.class) access. It does not say whether the callable SQL protocol admits a REF_CURSOR parameter. Hibernate resolves the raw driver report and compatibility workarounds through the standard REF_CURSOR override.

    • supportsScrollableResults

      boolean supportsScrollableResults()
      Whether scroll-insensitive result sets are reported as supported.
    • supportsGetGeneratedKeys

      boolean supportsGetGeneratedKeys()
      Whether JDBC generated-key retrieval is reported as supported.
    • supportsBatchUpdates

      boolean supportsBatchUpdates()

      Whether JDBC batch updates are effectively supported.

      Hibernate resolves the raw driver report through the batch-update override.

    • supportsDataDefinitionInTransaction

      boolean supportsDataDefinitionInTransaction()
      Whether DDL is reported as supported within transactions.
    • doesDataDefinitionCauseTransactionCommit

      boolean doesDataDefinitionCauseTransactionCommit()
      Whether DDL is reported to cause an implicit transaction commit.
    • getSqlStateType

      SQLStateType getSqlStateType()
      The SQL-state coding scheme reported by the JDBC driver.
    • getUrl

      String getUrl()
      The JDBC URL reported by the driver.
    • getDriver

      String getDriver()
      The JDBC driver name.
    • getTransactionIsolation

      int getTransactionIsolation()
      The bootstrap connection's transaction isolation level.
    • getDefaultTransactionIsolation

      int getDefaultTransactionIsolation()
      The default transaction isolation level reported by the driver.
    • getDefaultFetchSize

      int getDefaultFetchSize()
      The default JDBC fetch size observed from the bootstrap connection.
    • getSequenceInformationList

      default List<SequenceInformation> getSequenceInformationList()
      Information describing the database sequences.