Class TimeLiteralReplacedExpression

java.lang.Object
io.deephaven.time.TimeLiteralReplacedExpression

public class TimeLiteralReplacedExpression extends Object
TimeLiteralReplacedExpression is a query expression with time, period, and datetime literals replaced by instance variables. This contains the converted formula, instance variable declarations, and a map of types of the instance variables.
  • Method Details

    • getConvertedFormula

      public String getConvertedFormula()
      Gets the formula after replacing time, period, and datetime literals with variables.
      Returns:
      formula after replacing time, period, and datetime literals with variables.
    • getInstanceVariablesString

      public String getInstanceVariablesString()
      An expression that declares new instance variables.
      Returns:
      expression that declares new instance variables.
    • getNewVariables

      public HashMap<String,Class<?>> getNewVariables()
      Gets a map of names and types of new instance variables.
      Returns:
      a map of names and types of new instance variables.
    • convertExpression

      public static TimeLiteralReplacedExpression convertExpression(String expression) throws Exception
      Converts a query expression to a TimeLiteralReplacedExpression, where the time, period, and datetime literals are replaced by instance variables.
      Parameters:
      expression - query expression to convert.
      Returns:
      a TimeLiteralReplacedExpression where time, period, and datetime literals have been replaced by instance variables.
      Throws:
      Exception - If any error occurs or a literal value cannot be parsed.