Class OExpression
java.lang.Object
com.orientechnologies.orient.core.sql.parser.SimpleNode
com.orientechnologies.orient.core.sql.parser.OExpression
- All Implemented Interfaces:
Node
- Direct Known Subclasses:
OArrayConcatExpressionElement,OValueExpression
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected OArrayConcatExpressionprotected Booleanprotected Booleanprotected booleanprotected OJsonprotected OMathExpressionprotected ORidprotected BooleanFields inherited from class com.orientechnologies.orient.core.sql.parser.SimpleNode
children, firstToken, id, lastToken, PARAMETER_PLACEHOLDER, parent, parser, value -
Constructor Summary
ConstructorsConstructorDescriptionOExpression(int id) OExpression(OIdentifier identifier) OExpression(OIdentifier identifier, OModifier modifier) OExpression(ORecordAttribute attr, OModifier modifier) OExpression(OrientSql p, int id) -
Method Summary
Modifier and TypeMethodDescriptionbooleanallowsIndexedFunctionExecutionOnTarget(OFromClause target, OCommandContext context, OBinaryCompareOperator operator, Object right) tests if current expression is an indexed function AND that function can be used on this targetvoidapplyRemove(OResultInternal result, OCommandContext ctx) booleancanExecuteIndexedFunctionWithoutIndex(OFromClause target, OCommandContext context, OBinaryCompareOperator operator, Object right) tests if current expression is an indexed function AND that function can also be executed without using the indexcopy()voiddeserialize(OResult fromResult) static Stringstatic StringbooleanlongestimateIndexedFunction(OFromClause target, OCommandContext context, OBinaryCompareOperator operator, Object right) execute(OResult iCurrentRecord, OCommandContext ctx) executeIndexedFunction(OFromClause target, OCommandContext context, OBinaryCompareOperator operator, Object right) booleanexecuteIndexedFunctionAfterIndexSearch(OFromClause target, OCommandContext context, OBinaryCompareOperator operator, Object right) tests if current expression is an indexed function AND the function has also to be executed after the index search.voidextractSubQueries(OIdentifier letAlias, SubQueryCollector collector) voidextractSubQueries(SubQueryCollector collector) getCollate(OResult currentRecord, OCommandContext ctx) getPath()getRid()inthashCode()booleanbooleanbooleanbooleanisCount()booleanisDefinedFor(OElement currentRecord) booleanisDefinedFor(OResult currentRecord) booleanbooleanisExpand()booleanbooleanbooleanisIndexChain(OCommandContext ctx, OClass clazz) booleanbooleanisSelf()booleanneedsAliases(Set<String> aliases) booleanvoidsetArrayConcatExpression(OArrayConcatExpression arrayConcatExpression) voidsetMathExpression(OMathExpression mathExpression) voidsetNull(boolean isNull) voidsplitForAggregation(AggregateProjectionSplit aggregateSplit, OCommandContext ctx) booleanvoidtoGenericStatement(StringBuilder builder) voidtoString(Map<Object, Object> params, StringBuilder builder) Methods inherited from class com.orientechnologies.orient.core.sql.parser.SimpleNode
dump, getValue, jjtAddChild, jjtClose, jjtGetChild, jjtGetFirstToken, jjtGetLastToken, jjtGetNumChildren, jjtGetParent, jjtGetValue, jjtOpen, jjtSetFirstToken, jjtSetLastToken, jjtSetParent, jjtSetValue, toGenericStatement, toString, toString
-
Field Details
-
singleQuotes
-
doubleQuotes
-
isNull
protected boolean isNull -
rid
-
mathExpression
-
arrayConcatExpression
-
json
-
booleanValue
-
-
Constructor Details
-
OExpression
public OExpression(int id) -
OExpression
-
OExpression
-
OExpression
-
OExpression
-
-
Method Details
-
execute
-
getIndexKey
-
isBaseIdentifier
public boolean isBaseIdentifier() -
getPath
-
isEarlyCalculated
-
getDefaultAlias
-
toString
- Specified by:
toStringin classSimpleNode
-
toGenericStatement
- Specified by:
toGenericStatementin classSimpleNode
-
encode
-
supportsBasicCalculation
public boolean supportsBasicCalculation() -
isIndexedFunctionCal
public boolean isIndexedFunctionCal() -
encodeSingle
-
estimateIndexedFunction
public long estimateIndexedFunction(OFromClause target, OCommandContext context, OBinaryCompareOperator operator, Object right) -
executeIndexedFunction
public Iterable<OIdentifiable> executeIndexedFunction(OFromClause target, OCommandContext context, OBinaryCompareOperator operator, Object right) -
canExecuteIndexedFunctionWithoutIndex
public boolean canExecuteIndexedFunctionWithoutIndex(OFromClause target, OCommandContext context, OBinaryCompareOperator operator, Object right) tests if current expression is an indexed function AND that function can also be executed without using the index- Parameters:
target- the query targetcontext- the execution contextoperator-right-- Returns:
- true if current expression is an indexed function AND that function can also be executed without using the index, false otherwise
-
allowsIndexedFunctionExecutionOnTarget
public boolean allowsIndexedFunctionExecutionOnTarget(OFromClause target, OCommandContext context, OBinaryCompareOperator operator, Object right) tests if current expression is an indexed function AND that function can be used on this target- Parameters:
target- the query targetcontext- the execution contextoperator-right-- Returns:
- true if current expression involves an indexed function AND that function can be used on this target, false otherwise
-
executeIndexedFunctionAfterIndexSearch
public boolean executeIndexedFunctionAfterIndexSearch(OFromClause target, OCommandContext context, OBinaryCompareOperator operator, Object right) tests if current expression is an indexed function AND the function has also to be executed after the index search. In some cases, the index search is accurate, so this condition can be excluded from further evaluation. In other cases the result from the index is a superset of the expected result, so the function has to be executed anyway for further filtering- Parameters:
target- the query targetcontext- the execution context- Returns:
- true if current expression involves an indexed function AND the function has also to be executed after the index search.
-
isExpand
public boolean isExpand() -
getExpandContent
-
needsAliases
-
isAggregate
public boolean isAggregate() -
splitForAggregation
public OExpression splitForAggregation(AggregateProjectionSplit aggregateSplit, OCommandContext ctx) -
getAggregationContext
-
copy
- Overrides:
copyin classSimpleNode
-
equals
-
hashCode
public int hashCode() -
setMathExpression
-
extractSubQueries
-
extractSubQueries
-
refersToParent
public boolean refersToParent() -
getRid
-
setRid
-
getMathExpression
-
applyRemove
-
isCount
public boolean isCount() -
getArrayConcatExpression
-
setArrayConcatExpression
-
serialize
-
deserialize
-
isDefinedFor
-
isDefinedFor
-
getCollate
-
isCacheable
public boolean isCacheable() -
isIndexChain
-
isFunctionAny
public boolean isFunctionAny() -
isFunctionAll
public boolean isFunctionAll() -
setNull
public void setNull(boolean isNull) -
isSelf
public boolean isSelf()
-