Class SelectStatementBuilder

All Implemented Interfaces:
StatementBuilder<SelectStatementBuilder.SelectStatement>

public class SelectStatementBuilder extends AbstractStatementBuilder<SelectStatementBuilder.SelectStatement>
An implementation of a StatementBuilder that parses a CohQL term tree to produce an instance of a SelectStatementBuilder.SelectStatement.
Since:
Coherence 12.2.1
Author:
jk 2013.12.17
  • Field Details

  • Constructor Details

    • SelectStatementBuilder

      public SelectStatementBuilder()
  • Method Details

    • realize

      public SelectStatementBuilder.SelectStatement realize(ExecutionContext ctx, NodeTerm term, List listBindVars, ParameterResolver namedBindVars)
      Description copied from interface: StatementBuilder
      Realizes an implementation of a Statement that can be executed to perform a specific CohQL command.
      Parameters:
      ctx - the ExecutionContext to use to create commands
      term - the parsed NodeTerm used to create the relevant Statement
      listBindVars - the indexed bind variables
      namedBindVars - the named bind variables
      Returns:
      an executable instance of a Statement
    • getSyntax

      public String getSyntax()
      Description copied from interface: StatementBuilder
      Return the syntax of the CohQL command.
      Returns:
      the syntax of the CohQL command
    • getDescription

      public String getDescription()
      Description copied from interface: StatementBuilder
      Return a description of the CohQL command suitable for displaying as help text.
      Returns:
      a description of the CohQL command suitable for displaying as help text
    • createAggregator

      protected InvocableMap.EntryAggregator createAggregator(String cacheName, NodeTerm fields, String alias, boolean fDistinct, com.tangosol.coherence.dslquery.internal.SelectListMaker transformer)
      Create the InvocableMap.EntryAggregator that will aggregate the results of this select query.
      Parameters:
      cacheName - the cache being queried
      fields - the fields being selected
      alias - the alias of the cache name
      fDistinct - a flag indicating whether this is a distinct query
      transformer - the transformer to use to transform the field list to extractors
      Returns:
      an InvocableMap.EntryAggregator to use to aggregate the query results.
    • createSelectListMaker

      protected com.tangosol.coherence.dslquery.internal.SelectListMaker createSelectListMaker(List listBindVars, ParameterResolver namedBindVars, CoherenceQueryLanguage language)
      Create an instance of a SelectListMaker.
      Parameters:
      listBindVars - the indexed bind variables that the SelectListMaker should use
      namedBindVars - the named bind variables that the SelectListMaker should use
      language - the CohQL language instance that the SelectListMaker should use
      Returns:
      a SelectListMaker
    • isSelectStarQuery

      protected boolean isSelectStarQuery(String sAlias, NodeTerm termFields)
      Return true if this query is of the form "SELECT * FROM cache-name".
      Parameters:
      sAlias - the alias for the cache name
      termFields - the field list for the query
      Returns:
      true if this is a "SELECT * FROM cache-name" query