All Implemented Interfaces:
BoxVisitable

public class SQLInOperation extends SQLExpression
Abstract Node class representing SQL IN operation
  • Constructor Details

    • SQLInOperation

      public SQLInOperation(SQLExpression expression, List<SQLExpression> values, boolean not, Position position, String sourceText)
      Constructor
      Parameters:
      position - position of the statement in the source code
      sourceText - source code of the statement
  • Method Details

    • getExpression

      public SQLExpression getExpression()
      Get the expression
    • setExpression

      public void setExpression(SQLExpression expression)
      Set the expression
    • getValues

      public List<SQLExpression> getValues()
      Get the values
    • setValues

      public void setValues(List<SQLExpression> values)
      Set the values
    • isNot

      public boolean isNot()
      Get the not
    • setNot

      public void setNot(boolean not)
      Set the not
    • isBoolean

      public boolean isBoolean(QoQSelectExecution QoQExec)
      Runtime check if the expression evaluates to a boolean value and works for columns as well
      Overrides:
      isBoolean in class SQLExpression
      Parameters:
      QoQExec - Query execution state
      Returns:
      true if the expression evaluates to a boolean value
    • evaluate

      public Object evaluate(QoQSelectExecution QoQExec, int[] intersection)
      Evaluate the expression
      Specified by:
      evaluate in class SQLExpression
    • evaluateAggregate

      public Object evaluateAggregate(QoQSelectExecution QoQExec, List<int[]> intersections)
      Evaluate the expression aginst a partition of data
      Specified by:
      evaluateAggregate in class SQLExpression
    • accept

      public void accept(VoidBoxVisitor v)
      Description copied from interface: BoxVisitable
      Accept method for visitor support.
      Parameters:
      v - the visitor implementation
    • accept

      public BoxNode accept(ReplacingBoxVisitor v)
      Description copied from interface: BoxVisitable
      Accept method for replacing visitor support. Each accept returns the node, or a replacement node.
      Parameters:
      v - the visitor implementation
    • toMap

      public Map<String,Object> toMap()
      Overrides:
      toMap in class BoxNode