Interface TemporalTableSupport

All Known Implementing Classes:
DelegatingTemporalTableSupport

@SPI({USE,IMPLEMENT,SUPPLY}) public interface TemporalTableSupport

Defines the database grammar and capabilities used for temporal table DDL and historical queries.

Implement this contract with immutable, thread-safe state. Use rendered names from TemporalTableDdlRequest verbatim, return declarative auxiliary commands instead of mutating boot metadata, and make restriction choices only from the ephemeral TemporalRestrictionRequest.

Since:
8.0
See Also:
  • Method Details

    • supportsNativeTemporalTables

      boolean supportsNativeTemporalTables()
      Report whether the database provides native system-versioned tables.
    • getTemporalColumnType

      int getTemporalColumnType()
      Return the SqlTypes code used for temporal effectivity columns.
    • getTemporalColumnPrecision

      int getTemporalColumnPrecision()
      Return the default fractional-second precision of temporal effectivity columns.
    • getTemporalTableOptions

      @Nullable String getTemporalTableOptions(TemporalTableDdlRequest request)
      Render the trailing table options for the supplied table. Use every name in the request verbatim and return null when no options are needed.
    • suppressesTemporalTablePrimaryKeys

      boolean suppressesTemporalTablePrimaryKeys(boolean partitioned)
      Report whether a partitioned temporal table must omit its primary key.
    • supportsTemporalTablePartitioning

      boolean supportsTemporalTablePartitioning()
      Report whether the strategy can partition current and historical rows.
    • getTemporalTableAuxiliaryObjects

      List<TemporalTableAuxiliaryObject> getTemporalTableAuxiliaryObjects(TemporalTableDdlRequest request)
      Describe, in deterministic order, the schema commands required in addition to the temporal table itself. Return an immutable list and do not mutate boot metadata.
    • getExtraTemporalTableDeclarations

      @Nullable String getExtraTemporalTableDeclarations(TemporalTableDdlRequest request)
      Render declarations placed inside the temporal table definition. Use every request name verbatim and return null when none are needed.
    • createTemporalTableCheckConstraint

      boolean createTemporalTableCheckConstraint(TemporalTableStrategy strategy)
      Report whether Hibernate should add its effectivity check constraint for the selected storage strategy.
    • getAsOfOperator

      String getAsOfOperator(TemporalTableStrategy strategy)
      Return the SQL operator placed before a historical instant expression.
    • useAsOfOperator

      boolean useAsOfOperator(TemporalTableStrategy strategy)
      Report whether historical queries use getAsOfOperator(TemporalTableStrategy) for the selected strategy.
    • useAsOfOperatorForCurrent

      boolean useAsOfOperatorForCurrent(TemporalTableStrategy strategy)
      Report whether current-data queries use getAsOfOperator(TemporalTableStrategy) without an explicit historical instant.
    • useTemporalRestriction

      boolean useTemporalRestriction(TemporalRestrictionRequest request)
      Decide whether Hibernate should render effectivity-column restrictions from the supplied ephemeral query facts. Do not retain the request.
    • getTemporalExclusionColumnOption

      @Nullable String getTemporalExclusionColumnOption()
      Return the column option which excludes a column from native temporal versioning, or null when no option is needed.
    • getDefaultTemporalTableStrategy

      TemporalTableStrategy getDefaultTemporalTableStrategy()
      Return the concrete strategy selected when configuration requests TemporalTableStrategy.AUTO.