public class SqlMetaStatement extends Object implements SqlMetaElement
SqlMetaElement.process(SqlProcessContext)
Schematically:
SqlMetaStatement SqlMetaText SqlMetaIdent SqlMetaConst { SqlMetaAndOr} {? SqlMetaIf} {& SqlMetaAndOr} {| SqlMetaAndOr} {#DIGIT SqlMetaOrd}
Modifier and Type | Class and Description |
---|---|
static class |
SqlMetaStatement.Type
The SQL command type.
|
Modifier and Type | Field and Description |
---|---|
(package private) List<SqlMetaElement> |
elements
All sub-elements based on ANTLR grammar defined in SqlStatement.g.
|
(package private) boolean |
hasOutputMapping
An indicator for embedded output mapping
|
protected static org.slf4j.Logger |
logger
The internal slf4j logger.
|
(package private) String |
raw
A raw representation this META SQL statement
|
AND_PREFIX, CONST_PREFIX, IDENT_PREFIX, IDENT_SEPARATOR, lCONST_PREFIX, lIDENT_PREFIX, OR_PREFIX, SET_PREFIX, VALUES_PREFIX, WHERE_PREFIX
Constructor and Description |
---|
SqlMetaStatement()
Creates a new instance.
|
SqlMetaStatement(String raw)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
addElement(SqlMetaElement element)
Adds a new sub-element.
|
static SqlMetaStatement |
getInstance(String name,
String statement,
SqlTypeFactory typeFactory)
Simple factory method (design pattern).
|
String |
getRaw()
Returns raw representation this META SQL statement
|
boolean |
isHasOutputMapping()
Returns the indicator for embedded output mapping.
|
SqlProcessResult |
process(SqlMetaStatement.Type sqlStatementType,
Object dynamicInputValues,
SqlControl sqlControl,
SqlEngine sqlEngine)
The main contract for a dynamic ANSI SQL Query generation.
|
SqlProcessResult |
process(SqlProcessContext ctx)
The main contract for a dynamic ANSI SQL Query generation.
|
void |
setHasOutputMapping(boolean hasOutputMapping)
Sets the indicator for embedded output mapping.
|
protected static org.slf4j.Logger logger
String raw
List<SqlMetaElement> elements
boolean hasOutputMapping
SqlMetaStatement()
public SqlMetaStatement(String raw)
public static SqlMetaStatement getInstance(String name, String statement, SqlTypeFactory typeFactory) throws SqlEngineException
name
- the name of this META SQL query/statementstatement
- String representation of META SQL query/statementtypeFactory
- the factory for the META types constructionSqlEngineException
- in the case of ANTLR parsing exceptionpublic String getRaw()
void addElement(SqlMetaElement element)
element
- new sub-element, based on ANTLR grammarpublic boolean isHasOutputMapping()
public void setHasOutputMapping(boolean hasOutputMapping)
hasOutputMapping
- the indicator for embedded output mappingpublic SqlProcessResult process(SqlMetaStatement.Type sqlStatementType, Object dynamicInputValues, SqlControl sqlControl, SqlEngine sqlEngine)
sqlStatementType
- the SQL command typedynamicInputValues
- the SQL statement dynamic parameters (input values)sqlControl
- The compound parameters controlling the META SQL executionsqlEngine
- the primary SQL Processor class for the META SQL executionpublic SqlProcessResult process(SqlProcessContext ctx)
process
in interface SqlMetaElement
ctx
- the crate for all input parameters and the context of processingCopyright © 2015. All rights reserved.