Class OFunctionCall

java.lang.Object
com.orientechnologies.orient.core.sql.parser.SimpleNode
com.orientechnologies.orient.core.sql.parser.OFunctionCall
All Implemented Interfaces:
Node

public class OFunctionCall extends SimpleNode
  • Field Details

  • Constructor Details

    • OFunctionCall

      public OFunctionCall(int id)
    • OFunctionCall

      public OFunctionCall(OrientSql p, int id)
  • Method Details

    • isStar

      public boolean isStar()
    • getParams

      public List<OExpression> getParams()
    • setParams

      public void setParams(List<OExpression> params)
    • addParam

      public void addParam(OExpression param)
    • toString

      public void toString(Map<Object,Object> params, StringBuilder builder)
      Specified by:
      toString in class SimpleNode
    • toGenericStatement

      public void toGenericStatement(StringBuilder builder)
      Specified by:
      toGenericStatement in class SimpleNode
    • execute

      public Object execute(OResult targetObjects, OCommandContext ctx)
    • getIndexKey

      public Collection<Object> getIndexKey(OCommandContext ctx)
    • isIndexedFunctionCall

      public boolean isIndexedFunctionCall()
    • executeIndexedFunction

      public Iterable<OIdentifiable> executeIndexedFunction(OFromClause target, OCommandContext ctx, OBinaryCompareOperator operator, Object rightValue)
      see OIndexableSQLFunction.searchFromTarget()
      Parameters:
      target -
      ctx -
      operator -
      rightValue -
      Returns:
    • estimateIndexedFunction

      public long estimateIndexedFunction(OFromClause target, OCommandContext ctx, OBinaryCompareOperator operator, Object rightValue)
      Parameters:
      target - query target
      ctx - execution context
      operator - operator at the right of the function
      rightValue - value to compare to function result
      Returns:
      the approximate number of items returned by the condition execution, -1 if the extimation cannot be executed
    • canExecuteIndexedFunctionWithoutIndex

      public boolean canExecuteIndexedFunctionWithoutIndex(OFromClause target, OCommandContext context, OBinaryCompareOperator operator, Object right)
      tests if current function is an indexed function AND that function can also be executed without using the index
      Parameters:
      target - the query target
      context - the execution context
      operator -
      right -
      Returns:
      true if current function 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 function is an indexed function AND that function can be used on this target
      Parameters:
      target - the query target
      context - the execution context
      operator -
      right -
      Returns:
      true if current function is 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 target
      context - the execution context
      Returns:
      true if current expression is an indexed function AND the function has also to be executed after the index search.
    • isExpand

      public boolean isExpand()
    • needsAliases

      public boolean needsAliases(Set<String> aliases)
    • isAggregate

      public boolean isAggregate()
    • splitForAggregation

      public SimpleNode splitForAggregation(AggregateProjectionSplit aggregateProj, OCommandContext ctx)
    • isEarlyCalculated

      public boolean isEarlyCalculated(OCommandContext ctx)
    • getAggregationContext

      public AggregationContext getAggregationContext(OCommandContext ctx)
    • copy

      public OFunctionCall copy()
      Overrides:
      copy in class SimpleNode
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • refersToParent

      public boolean refersToParent()
    • getName

      public OIdentifier getName()
    • toMethod

      public OMethodCall toMethod()
    • serialize

      public OResult serialize()
    • deserialize

      public void deserialize(OResult fromResult)
    • extractSubQueries

      public void extractSubQueries(OIdentifier letAlias, SubQueryCollector collector)
    • extractSubQueries

      public void extractSubQueries(SubQueryCollector collector)
    • isCacheable

      public boolean isCacheable()