|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.sqlproc.engine.impl.SqlMetaStatement
public class SqlMetaStatement
Precompiled META SQL statement.
Instance of this class is created by the ANTLR parser. The grammar is defined in SqlStatement.g.
It's based on the Composite (desing pattern). The main contract is
SqlMetaElement.process(SqlProcessContext)
Schematically:
SqlMetaStatement SqlMetaText SqlMetaIdent SqlMetaConst { SqlMetaAndOr} {? SqlMetaIf} {& SqlMetaAndOr} {| SqlMetaAndOr} {#DIGIT SqlMetaOrd}
Nested Class Summary | |
---|---|
static class |
SqlMetaStatement.Type
The SQL command type. |
Field Summary | |
---|---|
(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. |
Fields inherited from interface org.sqlproc.engine.impl.SqlMetaElement |
---|
AND_PREFIX, CONST_PREFIX, IDENT_PREFIX, IDENT_SEPARATOR, lCONST_PREFIX, lIDENT_PREFIX, OR_PREFIX, SET_PREFIX, VALUES_PREFIX, WHERE_PREFIX |
Constructor Summary | |
---|---|
SqlMetaStatement()
Creates a new instance. |
Method Summary | |
---|---|
(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). |
boolean |
isHasOutputMapping()
Returns the indicator for embedded output mapping. |
SqlProcessResult |
process(SqlMetaStatement.Type sqlStatementType,
Object dynamicInputValues,
Object staticInputValues,
List<SqlOrder> order,
Map<String,Object> features,
Map<String,Object> runtimeFeatures,
SqlTypeFactory typeFactory,
SqlPluginFactory pluginFactory)
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static org.slf4j.Logger logger
List<SqlMetaElement> elements
boolean hasOutputMapping
Constructor Detail |
---|
SqlMetaStatement()
Method Detail |
---|
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 construction
SqlEngineException
- in the case of ANTLR parsing exceptionvoid 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, Object staticInputValues, List<SqlOrder> order, Map<String,Object> features, Map<String,Object> runtimeFeatures, SqlTypeFactory typeFactory, SqlPluginFactory pluginFactory)
sqlStatementType
- the SQL command typedynamicInputValues
- the SQL statement dynamic parameters (input values)staticInputValues
- the SQL statement static parameters (input values)order
- the list of ordering directivesfeatures
- the optional features in the statement/global scoperuntimeFeatures
- the optional features in the statement's exection scopetypeFactory
- the factory for the META types constructionpluginFactory
- the factory for the SQL Processor plugins
public SqlProcessResult process(SqlProcessContext ctx)
process
in interface SqlMetaElement
ctx
- the crate for all input parameters and the context of processing
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |