Class SelectExpression

java.lang.Object
com.aquima.interactions.expressions.optimizer.nodes.SelectExpression
All Implemented Interfaces:
IExpressionNode, Serializable

public class SelectExpression extends Object implements IExpressionNode
The select expression can be used to retrieve one or more values that match the specified condition.
Since:
6.4
Author:
O. Kerpershoek
See Also:
  • Constructor Details

    • SelectExpression

      public SelectExpression(Type resultType, IExpressionNode whatExpr, Identifier alias, IExpressionNode fromExpr, IExpressionNode whereExpr)
      Constructs the select expression.
      Parameters:
      resultType - The type of the result (mandatory)
      whatExpr - The expression that should be used to select the value(s) from the "from expression" (mandatory).
      alias - The alias that is used for each item present in the result of the from expression (mandatory).
      fromExpr - The expression that should be used to select the list of values the what expression should operate on (mandatory).
      whereExpr - The condition that should be applied to each value in the result of the from expression (optional).
  • Method Details

    • evaluate

      public IValue evaluate(IValueEnvironment environment)
      Description copied from interface: IExpressionNode
      This method evaluates the node using the environment passed as argument and returns the result as a value or null if the result is unknown.
      Specified by:
      evaluate in interface IExpressionNode
      Parameters:
      environment - The environment that should be used when evaluating the node.
      Returns:
      The result of the evaluation, or null if the result is unknown.
    • toString

      public String toString()
      Overrides:
      toString in class Object