Package com.arcadedb.query.sql.parser
Class ParenthesisBlock
- java.lang.Object
-
- com.arcadedb.query.sql.parser.SimpleNode
-
- com.arcadedb.query.sql.parser.BooleanExpression
-
- com.arcadedb.query.sql.parser.ParenthesisBlock
-
- All Implemented Interfaces:
Node
public class ParenthesisBlock extends BooleanExpression
-
-
Field Summary
-
Fields inherited from class com.arcadedb.query.sql.parser.BooleanExpression
FALSE, TRUE
-
Fields inherited from class com.arcadedb.query.sql.parser.SimpleNode
cachedStringForm, children, value
-
-
Constructor Summary
Constructors Constructor Description ParenthesisBlock(int id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ParenthesisBlock
copy()
Boolean
evaluate(Identifiable currentRecord, CommandContext context)
Boolean
evaluate(Result currentRecord, CommandContext context)
void
extractSubQueries(SubQueryCollector collector)
List<AndBlock>
flatten()
protected SimpleNode[]
getCacheableElements()
protected Object[]
getIdentityElements()
List<String>
getMatchPatternInvolvedAliases()
boolean
isAlwaysTrue()
returns true only if the expression does not need any further evaluation (eg.void
toString(Map<String,Object> params, StringBuilder builder)
-
Methods inherited from class com.arcadedb.query.sql.parser.BooleanExpression
createRangeWith, encapsulateInAndBlock, getIndexedFunctionConditions, isEmpty, isIndexAware, resolveKeyFrom, resolveKeyTo, transformToUpdateItem
-
Methods inherited from class com.arcadedb.query.sql.parser.SimpleNode
equals, getValue, hashCode, isCacheable, jjtAddChild, jjtClose, jjtGetChild, jjtGetFirstToken, jjtGetLastToken, jjtGetNumChildren, jjtGetParent, jjtGetValue, jjtOpen, jjtSetFirstToken, jjtSetLastToken, jjtSetParent, jjtSetValue, refersToParent, toString, toString
-
-
-
-
Method Detail
-
evaluate
public Boolean evaluate(Identifiable currentRecord, CommandContext context)
- Specified by:
evaluate
in classBooleanExpression
-
evaluate
public Boolean evaluate(Result currentRecord, CommandContext context)
- Specified by:
evaluate
in classBooleanExpression
-
toString
public void toString(Map<String,Object> params, StringBuilder builder)
- Overrides:
toString
in classSimpleNode
-
flatten
public List<AndBlock> flatten()
- Overrides:
flatten
in classBooleanExpression
-
copy
public ParenthesisBlock copy()
- Specified by:
copy
in classBooleanExpression
-
extractSubQueries
public void extractSubQueries(SubQueryCollector collector)
- Specified by:
extractSubQueries
in classBooleanExpression
-
getIdentityElements
protected Object[] getIdentityElements()
- Overrides:
getIdentityElements
in classSimpleNode
-
getMatchPatternInvolvedAliases
public List<String> getMatchPatternInvolvedAliases()
- Specified by:
getMatchPatternInvolvedAliases
in classBooleanExpression
-
getCacheableElements
protected SimpleNode[] getCacheableElements()
- Overrides:
getCacheableElements
in classSimpleNode
-
isAlwaysTrue
public boolean isAlwaysTrue()
Description copied from class:BooleanExpression
returns true only if the expression does not need any further evaluation (eg. "true") and always evaluates to true. It is supposed to be used as and optimization, and is allowed to return false negatives- Overrides:
isAlwaysTrue
in classBooleanExpression
- Returns:
-
-