Class QueryParser
java.lang.Object
com.inductiveautomation.ignition.common.db.namedquery.QueryParser
- 
Nested Class SummaryNested Classes
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic List<QueryParser.QueryToken>parseAndRebuild(NamedQuery query, Map<String, Object> parameters) parseAndRebuild(NamedQuery query, Map<String, Object> parameters, boolean removeComments) 
- 
Constructor Details- 
QueryParserpublic QueryParser()
 
- 
- 
Method Details- 
parse
- 
parseAndRebuildpublic static org.apache.commons.lang3.tuple.Pair<String,List<Object>> parseAndRebuild(NamedQuery query, Map<String, Object> parameters) throws Exception- Parameters:
- query- the query before substitution
- parameters- NamedQuery parameters
- Returns:
- Left: the original query with QueryStrings replaced and Parameters substituted with '?'
 Right: the parameter objects to be used in the query, in order, taken from the parameters map.
- Throws:
- Exception- if the query tokens don't match the parameter keys
 
- 
parseAndRebuildpublic static org.apache.commons.lang3.tuple.Pair<String,List<Object>> parseAndRebuild(NamedQuery query, Map<String, Object> parameters, boolean removeComments) throws Exception- Parameters:
- query- the query before substitution
- parameters- NamedQuery parameters
- removeComments- boolean indicating whether comments with double dash (--) should be removed
- Returns:
- Left: the original query with QueryStrings replaced, Parameters substituted with '?', and,
 depending on "removeComments" flag, comments removed. Comments are removed using simple regex. 
 Right: the parameter objects to be used in the query, in order, taken from the parameters map.
- Throws:
- Exception- if the query tokens don't match the parameter keys
 
 
-