Interface StatementBuilder

All Known Implementing Classes:
AbstractConditionalStatementBuilder, AbstractStatementBuilder, DeleteBuilder, ManualUpsert, NoOpStatementBuilder

public sealed interface StatementBuilder permits AbstractStatementBuilder, ManualUpsert, NoOpStatementBuilder
Interface for building SQL execution/update statements.
  • Method Details

    • dto

      Object dto()
    • node

      QueryNode node()
      Returns the current query node.
      Returns:
      the query node
    • nodeHash

      int nodeHash()
      Returns a cached copy of the AST node hash.
      Returns:
      the cached AST node hash
    • statementChain

      StatementChain statementChain()
      Returns the chain of statements built so far.
      Returns:
      The statement chain.
    • createUpdateMetaData

      UpdateMetaData createUpdateMetaData(PreparedOperation preparedOperation)
      Creates the update metadata for the statement.
      Parameters:
      preparedOperation - the prepared database operation
      Returns:
      the update metadata
    • setField

      void setField(String fieldName, @Nullable Object value)
      Sets a field value on the statement.
      Parameters:
      fieldName - the name of the field to set
      value - the value to set
    • build

      Builds the final SQL statement.
      Returns:
      The built statement.
    • resultType

      default Class<? extends Result> resultType()
      Returns the expected Result type produced when executing the built statement.
      Returns:
      the expected result class
    • combinable

      default boolean combinable()
    • combineWith

      default void combineWith(List<StatementBuilder> statementBuilders)