public class InsertStatementBuilder extends AbstractStatementBuilder<InsertStatementBuilder.InsertStatement>
StatementBuilder
that parses a CohQL term tree to produce an instance of a InsertStatementBuilder.InsertStatement.| Modifier and Type | Class and Description |
|---|---|
static class |
InsertStatementBuilder.InsertStatement
Implementation of the CohQL "INSERT" command.
|
| Modifier and Type | Field and Description |
|---|---|
static InsertStatementBuilder |
INSTANCE
An instance of a InsertStatementBuilder.
|
| Constructor and Description |
|---|
InsertStatementBuilder() |
| Modifier and Type | Method and Description |
|---|---|
protected Object |
createInsertKey(Term termKey,
UpdateSetListMaker transformer,
Object oValue)
Create the key to use in the insert statement.
|
protected Object |
createInsertValue(Term termValue,
UpdateSetListMaker transformer)
Create the instance of the value that will be inserted into the cache.
|
protected UpdateSetListMaker |
createUpdateSetListMaker(ExecutionContext ctx,
List listBindVars,
com.tangosol.config.expression.ParameterResolver namedBindVars)
Create an
UpdateSetListMaker. |
String |
getDescription()
Return a description of the CohQL command suitable for displaying
as help text.
|
String |
getSyntax()
Return the syntax of the CohQL command.
|
InsertStatementBuilder.InsertStatement |
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, headsMatchpublic static final InsertStatementBuilder INSTANCE
public InsertStatementBuilder.InsertStatement realize(ExecutionContext ctx, NodeTerm term, List listBindVars, com.tangosol.config.expression.ParameterResolver namedBindVars)
StatementBuilderStatement 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()
StatementBuilderpublic String getDescription()
StatementBuilderprotected Object createInsertKey(Term termKey, UpdateSetListMaker transformer, Object oValue)
termKey - the AST representing the Key termtransformer - the UpdateSetListMaker that will create the key instanceoValue - the value being inserted that will be used to call its getKey method if no
key term is presentCohQLException - if there are any errors creating the key instanceprotected Object createInsertValue(Term termValue, UpdateSetListMaker transformer)
termValue - the AST term to use to create the valuetransformer - the UpdateSetListMaker that can create values from AST termsCohQLException - if any errors occur creating the valueprotected UpdateSetListMaker createUpdateSetListMaker(ExecutionContext ctx, List listBindVars, com.tangosol.config.expression.ParameterResolver namedBindVars)
UpdateSetListMaker.ctx - the ExecutionContext to uselistBindVars - the indexed bind variables to pass to the UpdateSetListMakernamedBindVars - the named bind variables to pass to the UpdateSetListMaker