Class OQueryOperator

java.lang.Object
com.orientechnologies.orient.core.sql.operator.OQueryOperator
Direct Known Subclasses:
OQueryTargetOperator

public abstract class OQueryOperator extends Object
Query Operators. Remember to handle the operator in OQueryItemCondition.
Author:
Luca Garulli (l.garulli--(at)--orientdb.com)
  • Field Details

    • DEFAULT_OPERATORS_ORDER

      protected static final Class<?>[] DEFAULT_OPERATORS_ORDER
      Default operator order. can be used by additional operator to locate themself relatively to default ones.

      WARNING: ORDER IS IMPORTANT TO AVOID SUB-STRING LIKE "IS" and AND "INSTANCEOF": INSTANCEOF MUST BE PLACED BEFORE! AND ALSO FOR PERFORMANCE (MOST USED BEFORE)

    • keyword

      public final String keyword
    • precedence

      public final int precedence
    • expectedRightWords

      public final int expectedRightWords
    • unary

      public final boolean unary
    • expectsParameters

      public final boolean expectsParameters
  • Constructor Details

    • OQueryOperator

      protected OQueryOperator(String iKeyword, int iPrecedence, boolean iUnary)
    • OQueryOperator

      protected OQueryOperator(String iKeyword, int iPrecedence, boolean iUnary, int iExpectedRightWords)
    • OQueryOperator

      protected OQueryOperator(String iKeyword, int iPrecedence, boolean iUnary, int iExpectedRightWords, boolean iExpectsParameters)
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • configure

      public OQueryOperator configure(List<String> iParams)
      Default State-less implementation: does not save parameters and just return itself
      Parameters:
      iParams -
      Returns:
    • getSyntax

      public String getSyntax()
    • isUnary

      public boolean isUnary()
    • compare

      public OQueryOperator.ORDER compare(OQueryOperator other)
      Check priority of this operator compare to given operator.
      Parameters:
      other -
      Returns:
      ORDER place of this operator compared to given operator
    • canShortCircuit

      public boolean canShortCircuit(Object l)
    • isSupportingBinaryEvaluate

      public boolean isSupportingBinaryEvaluate()
    • getKeyword

      public String getKeyword()
    • evaluate

      public boolean evaluate(Object iLeft, Object iRight, OCommandContext ctx)