Class Cmp

Direct Known Subclasses:
CmpG, CmpN, CmpV

public abstract class Cmp extends Arr
Abstract comparison.
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Method Details

    • invert

      public final Expr invert(CompileContext cc) throws QueryException
      If possible, returns an optimized expression with inverted operands.
      Parameters:
      cc - compilation context
      Returns:
      original or modified expression
      Throws:
      QueryException - query exception
    • invert

      public abstract Expr invert()
      If possible, returns an expression with inverted operands.
      Returns:
      original or null
    • opV

      public abstract CmpV.OpV opV()
      Returns the value operator of the expression.
      Returns:
      operator, or null for node comparisons
    • optPred

      public final Expr optPred(Expr root, CompileContext cc) throws QueryException
      Optimizes this expression as predicate.
      Parameters:
      root - root expression
      cc - compilation context
      Returns:
      resulting expression
      Throws:
      QueryException - query exception