Class SingleRowTableSupport

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

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

Immutable description of the SQL used by a Dialect for a reusable single-row table and for an otherwise table-less select.

Providers supply a stable profile through Dialect.getSingleRowTableSupport(). The table expression is used where SQL requires a reusable one-row table expression. The select-only from clause is a complete fragment, including any alias or restriction required by the database; an empty fragment means that an otherwise table-less select requires no from clause.

Consumers must select the accessor matching the rendering context and must not derive one value from the other. Providers refining a Dialect family profile should copy the profile returned by the superclass and change only the values which differ.

Since:
8.0
See Also:
  • Field Details

    • STANDARD

      public static final SingleRowTableSupport STANDARD
      The base-Dialect profile: a standard values-table expression and no select-only from clause.
  • Method Details

    • builder

      public static SingleRowTableSupport.Builder builder()
      Create a builder initialized from STANDARD.
    • builder

      Create a builder initialized with both rendering values of the given profile.
      Parameters:
      base - the non-null profile to copy
    • getTableExpression

      public String getTableExpression()
      The nonblank table expression representing exactly one row.
    • getSelectOnlyFromClause

      public String getSelectOnlyFromClause()
      The complete from fragment for an otherwise table-less select, or the empty string when no fragment is required.