All Implemented Interfaces:
BoxVisitable

public class SQLParam extends SQLExpression
Abstract Node class representing SQL Param expression
  • Constructor Details

    • SQLParam

      public SQLParam(String name, int index, Position position, String sourceText)
      Constructor. Index is 1-based!
      Parameters:
      position - position of the statement in the source code
      sourceText - source code of the statement
  • Method Details

    • getName

      public String getName()
      Get the name of the function
      Returns:
      the name of the function
    • setName

      public void setName(String name)
      Set the name of the function
      Parameters:
      name - the name of the function
    • getIndex

      public int getIndex()
      Get the index. 1-based!
    • setIndex

      public void setIndex(int index)
      Set the index. 1-based!
    • 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
    • isNumeric

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

      public QueryColumnType getType(QoQSelectExecution QoQExec)
      What type does this expression evaluate to
      Overrides:
      getType in class SQLExpression
    • 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