Package com.influxdb.query.dsl
Class VariableAssignment
java.lang.Object
com.influxdb.query.dsl.Flux
com.influxdb.query.dsl.VariableAssignment
- All Implemented Interfaces:
Expression
,HasImports
,IsVariableAssignment
- Direct Known Subclasses:
AbstractFunctionFlux
Hold the variable name and expression of an assignment.
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();
- See Also:
-
Field Summary
Fields inherited from class com.influxdb.query.dsl.Flux
functionsParameters, imports
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
appendActual
(Map<String, Object> parameters, StringBuilder builder) Append actual Flux function to Flux query.Methods inherited from class com.influxdb.query.dsl.Flux
addImport, aggregateWindow, aggregateWindow, arrayFrom, arrayFrom, asVariable, collectImports, columns, columns, count, count, covariance, covariance, covariance, covariance, covariance, covariance, covariance, covariance, covariance, cumulativeSum, cumulativeSum, cumulativeSum, derivative, derivative, difference, difference, difference, difference, difference, difference, distinct, distinct, drop, drop, drop, drop, duplicate, duplicate, elapsed, elapsed, elapsed, elapsed, expression, fill, fill, filter, filter, first, from, from, from, function, group, groupBy, groupBy, groupBy, groupExcept, groupExcept, groupExcept, integral, integral, interpolateLinear, interpolateLinear, join, join, keep, keep, keep, keep, last, last, limit, limit, limit, map, map, max, max, mean, mean, min, min, pivot, pivot, pivot, quantile, quantile, quantile, quantile, quantile, range, range, range, range, range, range, range, reduce, reduce, rename, rename, rename, sample, sample, sample, set, set, skew, skew, sort, sort, sort, sort, sort, sort, spread, spread, stddev, stddev, sum, sum, tail, tail, tail, timeShift, timeShift, timeShift, timeShift, to, to, to, to, to, to, to, to, toBool, toDuration, toFloat, toInt, toString, toString, toStringConvert, toTime, toUInt, truncateTimeColumn, union, window, window, window, window, window, window, window, withFunction, withFunctionNamed, withPipedFunction, withPropertyNamed, withPropertyNamed, withPropertyValue, withPropertyValue, withPropertyValueEscaped, yield, yield
-
Field Details
-
name
-
expression
-
-
Constructor Details
-
VariableAssignment
- Parameters:
name
- the name of teh variableexpression
- the expression to assign to the variable
-
-
Method Details
-
getVariableName
- Specified by:
getVariableName
in interfaceIsVariableAssignment
- Returns:
- the name of the variable
-
appendActual
Description copied from class:Flux
Append actual Flux function to Flux query.- Specified by:
appendActual
in classFlux
- Parameters:
parameters
- named parameters for Flux querybuilder
- Flux query chaing
-
toString
- Specified by:
toString
in interfaceExpression
- Overrides:
toString
in classFlux
- Parameters:
parameters
- parameters to resolveprependImports
- true, if the imports should be prepended- Returns:
- the string representation of the expression
-
getImports
- Specified by:
getImports
in interfaceHasImports
- Overrides:
getImports
in classFlux
- Returns:
- all used imports of this flux
-