Interface ExpressionSimulator
-
- All Implemented Interfaces:
public interface ExpressionSimulator<E extends Engine<E>, T extends Object, X extends Expression<E, T>>Simulator for a certain Expression.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceExpressionSimulator.SubexpressionCallbacksCallbacks to simulate sub-expressions in the current evaluation context.
-
Method Summary
Modifier and Type Method Description abstract Function1<DataRow, T>simulateExpression(X expression)Provides a Kotlin simulation of the given Expression to be applied to a DataRow. abstract Function1<List<DataRow>, T>simulateAggregation(X expression)Provides a Kotlin simulation of the given Expression as an aggregation to be applied to multiple DataRows. abstract KClass<out X>getExpression()-
-
Method Detail
-
simulateExpression
abstract Function1<DataRow, T> simulateExpression(X expression)
Provides a Kotlin simulation of the given Expression to be applied to a DataRow.
- Parameters:
expression- the Expression to simulate- Returns:
a function that simulates the Expression
-
simulateAggregation
abstract Function1<List<DataRow>, T> simulateAggregation(X 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.- Parameters:
expression- the Expression to simulate- Returns:
a function that simulates the Expression
-
getExpression
abstract KClass<out X> getExpression()
-
-
-
-