public class OBinaryCondition extends OBooleanExpression
Modifier and Type | Field and Description |
---|---|
protected OExpression |
left |
protected OBinaryCompareOperator |
operator |
protected OExpression |
right |
FALSE, TRUE
children, firstToken, id, lastToken, parent, parser, value
Constructor and Description |
---|
OBinaryCondition(int id) |
OBinaryCondition(OrientSql p,
int id) |
deserializeFromOResult, encapsulateInAndBlock, flatten, isAlwaysTrue, isEmpty
childrenAccept, dump, getDatabase, getValue, jjtAccept, jjtAddChild, jjtClose, jjtGetChild, jjtGetFirstToken, jjtGetLastToken, jjtGetNumChildren, jjtGetParent, jjtGetValue, jjtOpen, jjtSetFirstToken, jjtSetLastToken, jjtSetParent, jjtSetValue, toString, toString
protected OExpression left
protected OBinaryCompareOperator operator
protected OExpression right
public OBinaryCondition(int id)
public OBinaryCondition(OrientSql p, int id)
public boolean evaluate(OIdentifiable currentRecord, OCommandContext ctx)
evaluate
in class OBooleanExpression
public boolean evaluate(OResult currentRecord, OCommandContext ctx)
evaluate
in class OBooleanExpression
public void toString(Map<Object,Object> params, StringBuilder builder)
toString
in class SimpleNode
protected boolean supportsBasicCalculation()
supportsBasicCalculation
in class OBooleanExpression
protected int getNumberOfExternalCalculations()
getNumberOfExternalCalculations
in class OBooleanExpression
protected List<Object> getExternalCalculationConditions()
getExternalCalculationConditions
in class OBooleanExpression
public OBinaryCondition isIndexedFunctionCondition(OClass iSchemaClass, ODatabaseDocumentInternal database)
public long estimateIndexed(OFromClause target, OCommandContext context)
public Iterable<OIdentifiable> executeIndexedFunction(OFromClause target, OCommandContext context)
public boolean canExecuteIndexedFunctionWithoutIndex(OFromClause target, OCommandContext context)
target
- the query targetcontext
- the execution contextpublic boolean allowsIndexedFunctionExecutionOnTarget(OFromClause target, OCommandContext context)
target
- the query targetcontext
- the execution contextpublic boolean executeIndexedFunctionAfterIndexSearch(OFromClause target, OCommandContext context)
target
- the query targetcontext
- the execution contextpublic List<OBinaryCondition> getIndexedFunctionConditions(OClass iSchemaClass, ODatabaseDocumentInternal database)
getIndexedFunctionConditions
in class OBooleanExpression
public boolean needsAliases(Set<String> aliases)
needsAliases
in class OBooleanExpression
public OBinaryCondition copy()
copy
in class OBooleanExpression
public void extractSubQueries(SubQueryCollector collector)
extractSubQueries
in class OBooleanExpression
public boolean refersToParent()
refersToParent
in class OBooleanExpression
public Optional<OUpdateItem> transformToUpdateItem()
OBooleanExpression
Eg. name = 3 can be considered a condition or an assignment. This method transforms the condition in an assignment. This is used mainly for UPSERT operations.
transformToUpdateItem
in class OBooleanExpression
public OExpression getLeft()
public OBinaryCompareOperator getOperator()
public OExpression getRight()
public void setLeft(OExpression left)
public void setOperator(OBinaryCompareOperator operator)
public void setRight(OExpression right)
public List<String> getMatchPatternInvolvedAliases()
getMatchPatternInvolvedAliases
in class OBooleanExpression
public void translateLuceneOperator()
translateLuceneOperator
in class OBooleanExpression
public OResult serialize()
serialize
in class OBooleanExpression
public void deserialize(OResult fromResult)
deserialize
in class OBooleanExpression
public boolean isCacheable()
isCacheable
in class OBooleanExpression
public OBooleanExpression rewriteIndexChainsAsSubqueries(OCommandContext ctx, OClass clazz)
rewriteIndexChainsAsSubqueries
in class OBooleanExpression
Copyright © 2009–2020 OrientDB. All rights reserved.