Class SelectStatementBuilder
java.lang.Object
com.tangosol.coherence.dslquery.statement.AbstractStatementBuilder<SelectStatementBuilder.SelectStatement>
com.tangosol.coherence.dslquery.statement.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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAsync implementation of the CohQL "SELECT" command.static classImplementation of the CohQL "SELECT" command. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SelectStatementBuilderAn instance of a SelectStatementBuilder. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected InvocableMap.EntryAggregatorcreateAggregator(String cacheName, NodeTerm fields, String alias, boolean fDistinct, com.tangosol.coherence.dslquery.internal.SelectListMaker transformer) Create theInvocableMap.EntryAggregatorthat will aggregate the results of this select query.protected com.tangosol.coherence.dslquery.internal.SelectListMakercreateSelectListMaker(List listBindVars, ParameterResolver namedBindVars, CoherenceQueryLanguage language) Create an instance of aSelectListMaker.Return a description of the CohQL command suitable for displaying as help text.Return the syntax of the CohQL command.protected booleanisSelectStarQuery(String sAlias, NodeTerm termFields) Return true if this query is of the form "SELECT * FROM cache-name".realize(ExecutionContext ctx, NodeTerm term, List listBindVars, ParameterResolver namedBindVars) Realizes an implementation of aStatementthat can be executed to perform a specific CohQL command.Methods inherited from class com.tangosol.coherence.dslquery.statement.AbstractStatementBuilder
atomicStringValueOf, ensureFilter, getAlias, getCacheName, getExtractor, getFields, getFile, getGroupBy, getInsertKey, getInsertValue, getIsDistinct, getSetList, getWhere, headsMatch
-
Field Details
-
INSTANCE
An instance of a SelectStatementBuilder.
-
-
Constructor Details
-
SelectStatementBuilder
public SelectStatementBuilder()
-
-
Method Details
-
realize
public SelectStatementBuilder.SelectStatement realize(ExecutionContext ctx, NodeTerm term, List listBindVars, ParameterResolver namedBindVars) Description copied from interface:StatementBuilderRealizes an implementation of aStatementthat can be executed to perform a specific CohQL command.- Parameters:
ctx- theExecutionContextto use to create commandsterm- the parsedNodeTermused to create the relevant StatementlistBindVars- the indexed bind variablesnamedBindVars- the named bind variables- Returns:
- an executable instance of a Statement
-
getSyntax
Description copied from interface:StatementBuilderReturn the syntax of the CohQL command.- Returns:
- the syntax of the CohQL command
-
getDescription
Description copied from interface:StatementBuilderReturn 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 theInvocableMap.EntryAggregatorthat will aggregate the results of this select query.- Parameters:
cacheName- the cache being queriedfields- the fields being selectedalias- the alias of the cache namefDistinct- a flag indicating whether this is a distinct querytransformer- 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 aSelectListMaker.- Parameters:
listBindVars- the indexed bind variables that the SelectListMaker should usenamedBindVars- the named bind variables that the SelectListMaker should uselanguage- the CohQL language instance that the SelectListMaker should use- Returns:
- a SelectListMaker
-
isSelectStarQuery
Return true if this query is of the form "SELECT * FROM cache-name".- Parameters:
sAlias- the alias for the cache nametermFields- the field list for the query- Returns:
- true if this is a "SELECT * FROM cache-name" query
-