Class Expressions

java.lang.Object
com.influxdb.query.dsl.Expressions
All Implemented Interfaces:
HasImports

public class Expressions extends Object implements HasImports
A container holding a list of Expressions.

Example

 VariableAssignment a = Flux.from("test1").asVariable("a");
 VariableAssignment b = Flux.from("test2").asVariable("b");

 String flux = new Expressions(
    a,
    b,
    a.first().yield("firstA"),
    b.first().yield("firstB"),
    a.last().yield("lastA"),
    b.last().yield("lastB")
 ).toString();
 
  • Constructor Details

    • Expressions

      public Expressions(@Nonnull Expression... expressions)
      Parameters:
      expressions - the expressions to be used
    • Expressions

      public Expressions(@Nonnull Collection<? extends Expression> expressions)
      Parameters:
      expressions - the expressions to be used
  • Method Details

    • addExpressions

      public Expressions addExpressions(@Nonnull Expression... expressions)
      Adds another expression to this container.
      Parameters:
      expressions - the expressions to be added
      Returns:
      this
    • toString

      public String toString(@Nonnull Map<String,Object> parameters, boolean prependImports)
      Parameters:
      parameters - parameters to resolve
      prependImports - true, if the imports should be prepended
      Returns:
      the string representation of the expressions
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getImports

      public Set<String> getImports()
      Specified by:
      getImports in interface HasImports
      Returns:
      the imports