Class SumAsLongSimulator
-
- All Implemented Interfaces:
-
rocks.frieler.kraftsql.testing.engine.ExpressionSimulator
public final class SumAsLongSimulator<E extends Engine<E>> extends AggregationSimulator<E, Long, Sum.Companion.SumAsLong<E>>
Simulator for SumAsLong expressions, the rocks.frieler.kraftsql.expressions.Sum that results in an integer-valued result.
-
-
Field Summary
Fields Modifier and Type Field Description private final KClass<out Sum.Companion.SumAsLong<E>>expression
-
Constructor Summary
Constructors Constructor Description SumAsLongSimulator()
-
Method Summary
Modifier and Type Method Description KClass<out Sum.Companion.SumAsLong<E>>getExpression()Function1<List<DataRow>, Long>simulateAggregation(Sum.Companion.SumAsLong<E> expression)Provides a Kotlin simulation of the given Expression as an aggregation to be applied to multiple DataRows. -
-
Method Detail
-
getExpression
KClass<out Sum.Companion.SumAsLong<E>> getExpression()
-
simulateAggregation
Function1<List<DataRow>, Long> simulateAggregation(Sum.Companion.SumAsLong<E> expression)
Provides a Kotlin simulation of the given Expression as an aggregation to be applied to multiple DataRows.
For the Expression to aggregate multiple DataRows, it must either be an rocks.frieler.kraftsql.expressions.Aggregation, one of the
groupExpressionsor the same must apply to all its sub-expressions.- Returns:
a function that simulates the Expression
-
-
-
-