Package com.arcadedb.query.sql.parser
Class ValueExpression
- java.lang.Object
-
- com.arcadedb.query.sql.parser.SimpleNode
-
- com.arcadedb.query.sql.parser.Expression
-
- com.arcadedb.query.sql.parser.ValueExpression
-
- All Implemented Interfaces:
Node
public class ValueExpression extends Expression
this class is only used by the query executor to store pre-calculated values and store them in a temporary AST. It's not produced by parsing
-
-
Field Summary
-
Fields inherited from class com.arcadedb.query.sql.parser.Expression
arrayConcatExpression, booleanValue, doubleQuotes, isNull, json, mathExpression, rid, singleQuotes
-
Fields inherited from class com.arcadedb.query.sql.parser.SimpleNode
children, firstToken, id, lastToken, parent, parser, value
-
-
Constructor Summary
Constructors Constructor Description ValueExpression(Object val)
-
Method Summary
-
Methods inherited from class com.arcadedb.query.sql.parser.Expression
encode, encodeSingle, estimateIndexedFunction, executeIndexedFunction, getArrayConcatExpression, getMathExpression, getRid, setArrayConcatExpression, setMathExpression, setRid
-
Methods inherited from class com.arcadedb.query.sql.parser.SimpleNode
childrenAccept, dump, getValue, jjtAccept, jjtAddChild, jjtClose, jjtGetChild, jjtGetFirstToken, jjtGetLastToken, jjtGetNumChildren, jjtGetParent, jjtGetValue, jjtOpen, jjtSetFirstToken, jjtSetLastToken, jjtSetParent, jjtSetValue, toString, toString
-
-
-
-
Constructor Detail
-
ValueExpression
public ValueExpression(Object val)
-
-
Method Detail
-
execute
public Object execute(Identifiable iCurrentRecord, CommandContext ctx)
- Overrides:
execute
in classExpression
-
execute
public Object execute(Result iCurrentRecord, CommandContext ctx)
- Overrides:
execute
in classExpression
-
isBaseIdentifier
public boolean isBaseIdentifier()
- Overrides:
isBaseIdentifier
in classExpression
-
isEarlyCalculated
public boolean isEarlyCalculated()
- Overrides:
isEarlyCalculated
in classExpression
-
getDefaultAlias
public Identifier getDefaultAlias()
- Overrides:
getDefaultAlias
in classExpression
-
toString
public void toString(Map<String,Object> params, StringBuilder builder)
- Overrides:
toString
in classExpression
-
supportsBasicCalculation
public boolean supportsBasicCalculation()
- Overrides:
supportsBasicCalculation
in classExpression
-
isIndexedFunctionCal
public boolean isIndexedFunctionCal()
- Overrides:
isIndexedFunctionCal
in classExpression
-
canExecuteIndexedFunctionWithoutIndex
public boolean canExecuteIndexedFunctionWithoutIndex(FromClause target, CommandContext context, BinaryCompareOperator operator, Object right)
Description copied from class:Expression
tests if current expression is an indexed function AND that function can also be executed without using the index- Overrides:
canExecuteIndexedFunctionWithoutIndex
in classExpression
- Parameters:
target
- the query targetcontext
- the execution context- Returns:
- true if current expression is an indexed funciton AND that function can also be executed without using the index, false otherwise
-
allowsIndexedFunctionExecutionOnTarget
public boolean allowsIndexedFunctionExecutionOnTarget(FromClause target, CommandContext context, BinaryCompareOperator operator, Object right)
Description copied from class:Expression
tests if current expression is an indexed function AND that function can be used on this target- Overrides:
allowsIndexedFunctionExecutionOnTarget
in classExpression
- Parameters:
target
- the query targetcontext
- the execution context- Returns:
- true if current expression involves an indexed function AND that function can be used on this target, false otherwise
-
executeIndexedFunctionAfterIndexSearch
public boolean executeIndexedFunctionAfterIndexSearch(FromClause target, CommandContext context, BinaryCompareOperator operator, Object right)
Description copied from class:Expression
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- Overrides:
executeIndexedFunctionAfterIndexSearch
in classExpression
- 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()
- Overrides:
isExpand
in classExpression
-
getExpandContent
public ValueExpression getExpandContent()
- Overrides:
getExpandContent
in classExpression
-
needsAliases
public boolean needsAliases(Set<String> aliases)
- Overrides:
needsAliases
in classExpression
-
isAggregate
public boolean isAggregate()
- Overrides:
isAggregate
in classExpression
-
splitForAggregation
public ValueExpression splitForAggregation(AggregateProjectionSplit aggregateSplit)
- Overrides:
splitForAggregation
in classExpression
-
getAggregationContext
public AggregationContext getAggregationContext(CommandContext ctx)
- Overrides:
getAggregationContext
in classExpression
-
copy
public ValueExpression copy()
- Overrides:
copy
in classExpression
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classExpression
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classExpression
-
extractSubQueries
public void extractSubQueries(SubQueryCollector collector)
- Overrides:
extractSubQueries
in classExpression
-
extractSubQueries
public void extractSubQueries(Identifier letAlias, SubQueryCollector collector)
- Overrides:
extractSubQueries
in classExpression
-
refersToParent
public boolean refersToParent()
- Overrides:
refersToParent
in classExpression
-
applyRemove
public void applyRemove(ResultInternal result, CommandContext ctx)
- Overrides:
applyRemove
in classExpression
-
isCount
public boolean isCount()
- Overrides:
isCount
in classExpression
-
serialize
public Result serialize()
- Overrides:
serialize
in classExpression
-
deserialize
public void deserialize(Result fromResult)
- Overrides:
deserialize
in classExpression
-
isDefinedFor
public boolean isDefinedFor(Result currentRecord)
- Overrides:
isDefinedFor
in classExpression
-
isDefinedFor
public boolean isDefinedFor(Record currentRecord)
- Overrides:
isDefinedFor
in classExpression
-
isCacheable
public boolean isCacheable()
- Overrides:
isCacheable
in classExpression
-
-