Interface MultiTableHandler

All Known Subinterfaces:
DeleteHandler, Handler, InsertHandler, UpdateHandler
All Known Implementing Classes:
AbstractCteMutationHandler, AbstractInlineHandler, AbstractMutationHandler, CteDeleteHandler, CteInsertHandler, CteSoftDeleteHandler, CteUpdateHandler, InlineDeleteHandler, InlineUpdateHandler, TableBasedDeleteHandler, TableBasedInsertHandler, TableBasedSoftDeleteHandler, TableBasedUpdateHandler

public interface MultiTableHandler
Simply as a matter of code structuring, it is often worthwhile to put all of the execution code into a separate handler (executor) class. This contract helps unify those helpers. Hiding this "behind the strategy" also allows mixing approaches based on the nature of specific queries
Since:
7.1
  • Method Details

    • createJdbcParameterBindings

      JdbcParameterBindings createJdbcParameterBindings(DomainQueryExecutionContext executionContext)
      Create the JdbcParameterBindings for this multi-table handler based on the execution context.
      Parameters:
      executionContext - Contextual information needed for execution
      Returns:
      The built parameter bindings
    • dependsOnParameterBindings

      boolean dependsOnParameterBindings()
      Signals that the SQL depends on the parameter bindings e.g. due to the need for inlining of parameter values or multiValued parameters.
    • isCompatibleWith

      boolean isCompatibleWith(JdbcParameterBindings jdbcParameterBindings, QueryOptions queryOptions)
    • execute

      int execute(JdbcParameterBindings jdbcParameterBindings, DomainQueryExecutionContext executionContext)
      Execute the multi-table update or delete indicated by the SQM AST passed in when this Handler was created.
      Parameters:
      jdbcParameterBindings - The parameter bindings for JDBC parameters
      executionContext - Contextual information needed for execution
      Returns:
      The "number of rows affected" count