Class FetchClauseSupport

java.lang.Object
org.hibernate.dialect.sql.ast.spi.FetchClauseSupport

@SPI({USE,SUPPLY}) public final class FetchClauseSupport extends Object

Immutable description of the fetch clause forms accepted by a database.

A Dialect supplies one stable profile through Dialect.getFetchClauseSupport(). Each FetchClauseType is independent: do not infer percent or ties support from ordinary row-count support.

Since:
8.0
See Also:
  • Field Details

    • NONE

      public static final FetchClauseSupport NONE
      No fetch clause form is supported.
    • ROWS_ONLY

      public static final FetchClauseSupport ROWS_ONLY
      Only fetch first n rows only is supported.
    • ROWS

      public static final FetchClauseSupport ROWS
      Both ordinary row-count and row-count-with-ties forms are supported.
    • ALL

      public static final FetchClauseSupport ALL
      Every standard row-count, percent, and ties form is supported.
  • Method Details

    • of

      public static FetchClauseSupport of(FetchClauseType... supportedTypes)

      Create an immutable profile containing exactly the supplied forms.

      Duplicate forms are ignored. The four stock sets are canonicalized to NONE, ROWS_ONLY, ROWS, or ALL.

    • getSupportedTypes

      public Set<FetchClauseType> getSupportedTypes()
      The immutable set of supported fetch clause forms.
    • supports

      public boolean supports(FetchClauseType type)
      Whether the given fetch clause form is supported.