Package com.arcadedb.query.sql.parser
Class AndBlock
- java.lang.Object
-
- com.arcadedb.query.sql.parser.SimpleNode
-
- com.arcadedb.query.sql.parser.BooleanExpression
-
- com.arcadedb.query.sql.parser.AndBlock
-
- All Implemented Interfaces:
Node
public class AndBlock 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 AndBlock(int id)
AndBlock(List<BooleanExpression>... expressions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AndBlock
copy()
protected AndBlock
encapsulateInAndBlock(BooleanExpression item)
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<BinaryCondition>
getIndexedFunctionConditions(DocumentType iSchemaClass, CommandContext context)
List<String>
getMatchPatternInvolvedAliases()
List<BooleanExpression>
getSubBlocks()
boolean
isAlwaysTrue()
returns true only if the expression does not need any further evaluation (eg.boolean
isEmpty()
void
toString(Map<String,Object> params, StringBuilder builder)
-
Methods inherited from class com.arcadedb.query.sql.parser.BooleanExpression
createRangeWith, 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
-
-
-
-
Constructor Detail
-
AndBlock
public AndBlock(int id)
-
AndBlock
public AndBlock(List<BooleanExpression>... expressions)
-
-
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
-
getSubBlocks
public List<BooleanExpression> getSubBlocks()
-
toString
public void toString(Map<String,Object> params, StringBuilder builder)
- Overrides:
toString
in classSimpleNode
-
getIndexedFunctionConditions
public List<BinaryCondition> getIndexedFunctionConditions(DocumentType iSchemaClass, CommandContext context)
- Overrides:
getIndexedFunctionConditions
in classBooleanExpression
-
flatten
public List<AndBlock> flatten()
- Overrides:
flatten
in classBooleanExpression
-
encapsulateInAndBlock
protected AndBlock encapsulateInAndBlock(BooleanExpression item)
- Overrides:
encapsulateInAndBlock
in classBooleanExpression
-
copy
public AndBlock copy()
- Specified by:
copy
in classBooleanExpression
-
isEmpty
public boolean isEmpty()
- Overrides:
isEmpty
in classBooleanExpression
-
extractSubQueries
public void extractSubQueries(SubQueryCollector collector)
- Specified by:
extractSubQueries
in classBooleanExpression
-
getMatchPatternInvolvedAliases
public List<String> getMatchPatternInvolvedAliases()
- Specified by:
getMatchPatternInvolvedAliases
in classBooleanExpression
-
getIdentityElements
protected Object[] getIdentityElements()
- Overrides:
getIdentityElements
in classSimpleNode
-
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:
-
-