public class SelectStatementBuilder extends AbstractStatementBuilder<SelectStatementBuilder.SelectStatement>
StatementBuilder
that parses a CohQL term tree to produce an instance of a SelectStatementBuilder.SelectStatement
.Modifier and Type | Class and Description |
---|---|
static class |
SelectStatementBuilder.SelectStatement
Implementation of the CohQL "SELECT" command.
|
Modifier and Type | Field and Description |
---|---|
static SelectStatementBuilder |
INSTANCE
An instance of a SelectStatementBuilder.
|
Constructor and Description |
---|
SelectStatementBuilder() |
Modifier and Type | Method and Description |
---|---|
protected InvocableMap.EntryAggregator |
createAggregator(String cacheName,
NodeTerm fields,
String alias,
boolean fDistinct,
SelectListMaker transformer)
Create the
InvocableMap.EntryAggregator that will aggregate the results of this
select query. |
protected SelectListMaker |
createSelectListMaker(List listBindVars,
com.tangosol.config.expression.ParameterResolver namedBindVars,
CoherenceQueryLanguage language)
Create an instance of a
SelectListMaker . |
String |
getDescription()
Return a description of the CohQL command suitable for displaying
as help text.
|
String |
getSyntax()
Return the syntax of the CohQL command.
|
protected boolean |
isSelectStarQuery(String sAlias,
NodeTerm termFields)
Return true if this query is of the form "SELECT * FROM cache-name".
|
SelectStatementBuilder.SelectStatement |
realize(ExecutionContext ctx,
NodeTerm term,
List listBindVars,
com.tangosol.config.expression.ParameterResolver namedBindVars)
Realizes an implementation of a
Statement that can be
executed to perform a specific CohQL command. |
atomicStringValueOf, ensureFilter, getAlias, getCacheName, getExtractor, getFields, getFile, getGroupBy, getInsertKey, getInsertValue, getIsDistinct, getSetList, getWhere, headsMatch
public static final SelectStatementBuilder INSTANCE
public SelectStatementBuilder.SelectStatement realize(ExecutionContext ctx, NodeTerm term, List listBindVars, com.tangosol.config.expression.ParameterResolver namedBindVars)
StatementBuilder
Statement
that can be
executed to perform a specific CohQL command.ctx
- the ExecutionContext
to use to create commandsterm
- the parsed NodeTerm
used to create the relevant StatementlistBindVars
- the indexed bind variablesnamedBindVars
- the named bind variablespublic String getSyntax()
StatementBuilder
public String getDescription()
StatementBuilder
protected InvocableMap.EntryAggregator createAggregator(String cacheName, NodeTerm fields, String alias, boolean fDistinct, SelectListMaker transformer)
InvocableMap.EntryAggregator
that will aggregate the results of this
select query.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 extractorsprotected SelectListMaker createSelectListMaker(List listBindVars, com.tangosol.config.expression.ParameterResolver namedBindVars, CoherenceQueryLanguage language)
SelectListMaker
.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 useprotected boolean isSelectStarQuery(String sAlias, NodeTerm termFields)
sAlias
- the alias for the cache nametermFields
- the field list for the query