class SqlMetaOrd extends Object implements SqlMetaElement
Schematically:
SqlMetaOrd SqlMetaText SqlMetaIdent SqlMetaConst
Modifier and Type | Field and Description |
---|---|
(package private) List<SqlMetaSimple> |
elements
The list of sub-elements based on ANTLR grammar.
|
(package private) String |
id
The ordering id.
|
(package private) org.slf4j.Logger |
logger
The internal slf4j logger.
|
AND_PREFIX, CONST_PREFIX, IDENT_PREFIX, IDENT_SEPARATOR, lCONST_PREFIX, lIDENT_PREFIX, OR_PREFIX, SET_PREFIX, VALUES_PREFIX, WHERE_PREFIX
Constructor and Description |
---|
SqlMetaOrd(String id)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
addElement(SqlMetaSimple element)
Adds a new sub-element.
|
SqlProcessResult |
process(SqlProcessContext ctx)
The main contract for a dynamic ANSI SQL Query generation.
|
private StringBuilder |
process(StringBuilder sql,
SqlOrder.Order orderDirrection)
Returns ANSI SQL ORDER command for one ordering rule.
|
final org.slf4j.Logger logger
List<SqlMetaSimple> elements
String id
SqlMetaOrd(String id)
id
- the ordering id, which corresponds to the order number in META SQL {#NNN order by ...}void addElement(SqlMetaSimple element)
element
- new sub-element, based on ANTLR grammarprivate StringBuilder process(StringBuilder sql, SqlOrder.Order orderDirrection)
sql
- the cumulative fragment of the final ordering commandorderDirrection
- the ASC or DESC ordering directionpublic SqlProcessResult process(SqlProcessContext ctx)
process
in interface SqlMetaElement
ctx
- the crate for all input parameters and the context of processingCopyright © 2015. All rights reserved.