Interface SQLFragmentStep


public interface SQLFragmentStep
A structured fragment builder. Raw SQL text is trusted input and is not parsed; identifiers and parameters are represented as separate structured parts so the compiler can quote identifiers and track parameter occurrences. Prefer structured expressions for operators and explicitly group a fragment expression when its internal precedence matters.
Since:
4.15
Author:
Eike Stepper
No Implement
This interface is not intended to be implemented by clients.
No Extend
This interface is not intended to be extended by clients.
  • Method Details

    • sql

      SQLFragmentStep sql(String trustedSQL)
      Appends trusted SQL text to the fragment. Raw text is not parsed and must not contain ?, even inside a quoted SQL literal. Represent every JDBC parameter placeholder with SQL.param() or a structured fragment parameter token. Generated literals such as SQL.literal("?") are separate structured expressions and are allowed. This restriction keeps positional and identity-based JDBC binding reliable.
      Parameters:
      trustedSQL - trusted SQL text, supplied as a literal
      Returns:
      the next valid fluent stage
      Since:
      4.15
    • table

      SQLFragmentStep table(IDBTable table)
      Appends a schema table identifier or table reference as a structured fragment part.
      Parameters:
      table - the schema table or table occurrence
      Returns:
      the next valid fluent stage
      Since:
      4.15
    • table

      Appends a schema table identifier or table reference as a structured fragment part.
      Parameters:
      table - the schema table or table occurrence
      Returns:
      the next valid fluent stage
      Since:
      4.15
    • column

      SQLFragmentStep column(IDBField column)
      Appends a schema column or qualified column reference as a structured fragment part.
      Parameters:
      column - the existing schema column
      Returns:
      the next valid fluent stage
      Since:
      4.15
    • column

      SQLFragmentStep column(SQLColumnRef column)
      Appends a schema column or qualified column reference as a structured fragment part.
      Parameters:
      column - the existing schema column
      Returns:
      the next valid fluent stage
      Since:
      4.15
    • param

      SQLFragmentStep param(SQLParameter parameter)
      Appends the supplied logical parameter identity as a placeholder part.
      Parameters:
      parameter - the immutable parameter identity
      Returns:
      the next valid fluent stage
      Since:
      4.15
    • expression

      SQLFragmentStep expression(SQLExpression expression)
      Appends a typed SQL expression as a fragment part.
      Parameters:
      expression - the expression used by this clause
      Returns:
      the next valid fluent stage
      Since:
      4.15
    • condition

      SQLFragmentStep condition(SQLCondition condition)
      Appends a typed SQL condition as a fragment part.
      Parameters:
      condition - the complete condition to add
      Returns:
      the next valid fluent stage
      Since:
      4.15
    • fragment

      SQLFragmentStep fragment(SQLFragment fragment)
      Appends another structured fragment without converting it to raw text.
      Parameters:
      fragment - the fragment to append
      Returns:
      the next valid fluent stage
      Since:
      4.15
    • build

      SQLFragment build()
      Captures the parts completed so far in a new immutable fragment. Later calls through a retained builder stage do not alter an already built fragment.
      Returns:
      an immutable SQL fragment
      Since:
      4.15