public abstract class AbstractStatementBuilder<T extends Statement> extends Object implements StatementBuilder<T>
StatementBuilder
implementations.Constructor and Description |
---|
AbstractStatementBuilder() |
Modifier and Type | Method and Description |
---|---|
protected static String |
atomicStringValueOf(Term t)
Return a String that is the value of the given Term.
|
protected static Filter |
ensureFilter(NodeTerm termWhere,
String sCacheName,
String sAlias,
List listBindVars,
com.tangosol.config.expression.ParameterResolver namedBindVars,
ExecutionContext ctx)
Build a
Filter for the given cache using the given where clause,
alias and bind environments. |
protected static String |
getAlias(NodeTerm sn)
Return the String that represents the cache name alias from the given AST
node by looking for the "alias" term in the AST.
|
protected static String |
getCacheName(NodeTerm sn)
Return the String that represents the cache name from the given AST
node by looking for the "from" term AST.
|
protected static Term |
getExtractor(NodeTerm sn)
Return the AST node that represents the extractor for an index from the
given AST node.
|
protected static NodeTerm |
getFields(NodeTerm sn)
Return the AST node that represents the fields to select from the
given AST node.
|
protected static String |
getFile(NodeTerm sn)
Return the String that represents the filename from the given AST
node by looking for the "file" term in the AST.
|
protected static NodeTerm |
getGroupBy(NodeTerm sn)
Return the AST node that represents the group by fields from the
given AST node.
|
protected static Term |
getInsertKey(NodeTerm sn)
Return the AST node that represents the key to insert from the
given AST node.
|
protected static Term |
getInsertValue(NodeTerm sn)
Return the AST node that represents the value to insert from the
given AST node.
|
protected static boolean |
getIsDistinct(NodeTerm sn)
Return the boolean that indicates whether distinctness in indicated
in the given AST node.
|
protected static Term |
getSetList(NodeTerm sn)
Return the AST node that represents the list of "Set statements" from the
given AST node.
|
protected static NodeTerm |
getWhere(NodeTerm sn)
Return the AST node that represents the where clause from the given AST
node.
|
protected static boolean |
headsMatch(NodeTerm fieldList,
NodeTerm groupByList)
Test to see if the AST for the group-by is equal to the head of
the list from the select clause AST.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDescription, getSyntax, realize
protected static Filter ensureFilter(NodeTerm termWhere, String sCacheName, String sAlias, List listBindVars, com.tangosol.config.expression.ParameterResolver namedBindVars, ExecutionContext ctx)
Filter
for the given cache using the given where clause,
alias and bind environments.termWhere
- the NodeTerm
containing the where clausesCacheName
- the name of the cache that the filter will be built forsAlias
- the table/cache alias used in the where clause, may be nulllistBindVars
- bind variables to be used to replace any numeric bind
variables in the where clausenamedBindVars
- named bind variables to be used to replace any named bind
variables in the where clausectx
- the ExecutionContext
to useFilter
created from the given where clauseprotected static String atomicStringValueOf(Term t)
t
- the Term that is atomicprotected static String getCacheName(NodeTerm sn)
sn
- the syntax nodeprotected static String getAlias(NodeTerm sn)
sn
- the syntax nodeprotected static String getFile(NodeTerm sn)
sn
- the syntax nodeprotected static boolean getIsDistinct(NodeTerm sn)
sn
- the syntax nodeprotected static NodeTerm getWhere(NodeTerm sn)
sn
- the syntax nodeprotected static NodeTerm getFields(NodeTerm sn)
sn
- the syntax nodeprotected static Term getInsertKey(NodeTerm sn)
sn
- the syntax nodeprotected static Term getInsertValue(NodeTerm sn)
sn
- the syntax nodeprotected static NodeTerm getGroupBy(NodeTerm sn)
sn
- the syntax nodeprotected static Term getSetList(NodeTerm sn)
sn
- the syntax nodeprotected static Term getExtractor(NodeTerm sn)
sn
- the syntax nodeprotected static boolean headsMatch(NodeTerm fieldList, NodeTerm groupByList)
fieldList
- the list of fields in a select listgroupByList
- the list of fields in a group by clause