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.

    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • 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()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • 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 groupExpressions or the same must apply to all its sub-expressions.

        Parameters:
        expression - the Expression to simulate
        Returns:

        a function that simulates the Expression