Class OSQLPredicate
java.lang.Object
com.orientechnologies.common.parser.OBaseParser
com.orientechnologies.orient.core.sql.filter.OSQLPredicate
- All Implemented Interfaces:
OCommandPredicate
- Direct Known Subclasses:
OSQLFilter
Parses text in SQL format and build a tree of conditions.
- Author:
- Luca Garulli (l.garulli--(at)--orientdb.com)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected OCommandContextprotected List<OSQLFilterItemParameter> protected OSQLFilterConditionFields inherited from class com.orientechnologies.common.parser.OBaseParser
parserText, parserTextUpperCase -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddParameter(String iName) voidbindParameters(Map<Object, Object> iArgs) Binds parameters.protected booleancheckForEnd(String iWord) computePrefetchFieldList(OSQLFilterCondition iCondition, Set<String> iFields) evaluate()evaluate(OCommandContext iContext) evaluate(OIdentifiable iRecord, ODocument iCurrentResult, OCommandContext iContext) Evaluates the predicate.protected OSQLFilterConditionprotected ObjectextractConditions(OSQLFilterCondition iParentCondition) protected voidoptimize()voidsetRootCondition(OSQLFilterCondition iCondition) protected voidthrowSyntaxErrorException(String iText) Throws a syntax error exception.toString()static StringMethods inherited from class com.orientechnologies.common.parser.OBaseParser
getLastWordLength, getSyntax, getWordStatic, nextWord, nextWord, parseOptionalWord, parserGetCurrentChar, parserGetCurrentPosition, parserGetLastSeparator, parserGetLastWord, parserGetPreviousPosition, parserGoBack, parserIsEnded, parserMoveCurrentPosition, parserNextChars, parserNextWord, parserNextWord, parserNextWord, parserOptionalKeyword, parserOptionalWord, parserRequiredKeyword, parserRequiredWord, parserRequiredWord, parserRequiredWord, parserSetCurrentPosition, parserSetEndOfText, parserSetLastSeparator, parserSkipWhiteSpaces
-
Field Details
-
properties
-
rootCondition
-
recordTransformed
-
parameterItems
-
braces
protected int braces -
context
-
-
Constructor Details
-
OSQLPredicate
public OSQLPredicate() -
OSQLPredicate
-
-
Method Details
-
throwSyntaxErrorException
Description copied from class:OBaseParserThrows a syntax error exception.- Specified by:
throwSyntaxErrorExceptionin classOBaseParser- Parameters:
iText- Text about the problem.
-
upperCase
-
text
-
evaluate
-
evaluate
-
evaluate
Description copied from interface:OCommandPredicateEvaluates the predicate.- Specified by:
evaluatein interfaceOCommandPredicate- Parameters:
iRecord- Target recordiCurrentResult- TODOiContext- Context of execution- Returns:
- The result of predicate
-
extractConditions
-
extractCondition
-
checkForEnd
-
getRootCondition
-
toString
-
bindParameters
Binds parameters. -
addParameter
-
setRootCondition
-
optimize
protected void optimize() -
computePrefetchFieldList
-