@JvmName(name = "_aggregateColumns2To") inline fun <E : Any, T : BaseTable<E>, K : Any, C1 : Any, C2 : Any, M : MutableMap<in K?, in Tuple2<C1?, C2?>>> EntityGrouping<E, T, K>.aggregateColumnsTo(destination: M, aggregationSelector: (T) -> Tuple2<ColumnDeclaring<C1>, ColumnDeclaring<C2>>): M@JvmName(name = "_aggregateColumns3To") inline fun <E : Any, T : BaseTable<E>, K : Any, C1 : Any, C2 : Any, C3 : Any, M : MutableMap<in K?, in Tuple3<C1?, C2?, C3?>>> EntityGrouping<E, T, K>.aggregateColumnsTo(destination: M, aggregationSelector: (T) -> Tuple3<ColumnDeclaring<C1>, ColumnDeclaring<C2>, ColumnDeclaring<C3>>): M@JvmName(name = "_aggregateColumns4To") inline fun <E : Any, T : BaseTable<E>, K : Any, C1 : Any, C2 : Any, C3 : Any, C4 : Any, M : MutableMap<in K?, in Tuple4<C1?, C2?, C3?, C4?>>> EntityGrouping<E, T, K>.aggregateColumnsTo(destination: M, aggregationSelector: (T) -> Tuple4<ColumnDeclaring<C1>, ColumnDeclaring<C2>, ColumnDeclaring<C3>, ColumnDeclaring<C4>>): M@JvmName(name = "_aggregateColumns5To") inline fun <E : Any, T : BaseTable<E>, K : Any, C1 : Any, C2 : Any, C3 : Any, C4 : Any, C5 : Any, M : MutableMap<in K?, in Tuple5<C1?, C2?, C3?, C4?, C5?>>> EntityGrouping<E, T, K>.aggregateColumnsTo(destination: M, aggregationSelector: (T) -> Tuple5<ColumnDeclaring<C1>, ColumnDeclaring<C2>, ColumnDeclaring<C3>, ColumnDeclaring<C4>, ColumnDeclaring<C5>>): M@JvmName(name = "_aggregateColumns6To") inline fun <E : Any, T : BaseTable<E>, K : Any, C1 : Any, C2 : Any, C3 : Any, C4 : Any, C5 : Any, C6 : Any, M : MutableMap<in K?, in Tuple6<C1?, C2?, C3?, C4?, C5?, C6?>>> EntityGrouping<E, T, K>.aggregateColumnsTo(destination: M, aggregationSelector: (T) -> Tuple6<ColumnDeclaring<C1>, ColumnDeclaring<C2>, ColumnDeclaring<C3>, ColumnDeclaring<C4>, ColumnDeclaring<C5>, ColumnDeclaring<C6>>): M@JvmName(name = "_aggregateColumns7To") inline fun <E : Any, T : BaseTable<E>, K : Any, C1 : Any, C2 : Any, C3 : Any, C4 : Any, C5 : Any, C6 : Any, C7 : Any, M : MutableMap<in K?, in Tuple7<C1?, C2?, C3?, C4?, C5?, C6?, C7?>>> EntityGrouping<E, T, K>.aggregateColumnsTo(destination: M, aggregationSelector: (T) -> Tuple7<ColumnDeclaring<C1>, ColumnDeclaring<C2>, ColumnDeclaring<C3>, ColumnDeclaring<C4>, ColumnDeclaring<C5>, ColumnDeclaring<C6>, ColumnDeclaring<C7>>): M@JvmName(name = "_aggregateColumns8To") inline fun <E : Any, T : BaseTable<E>, K : Any, C1 : Any, C2 : Any, C3 : Any, C4 : Any, C5 : Any, C6 : Any, C7 : Any, C8 : Any, M : MutableMap<in K?, in Tuple8<C1?, C2?, C3?, C4?, C5?, C6?, C7?, C8?>>> EntityGrouping<E, T, K>.aggregateColumnsTo(destination: M, aggregationSelector: (T) -> Tuple8<ColumnDeclaring<C1>, ColumnDeclaring<C2>, ColumnDeclaring<C3>, ColumnDeclaring<C4>, ColumnDeclaring<C5>, ColumnDeclaring<C6>, ColumnDeclaring<C7>, ColumnDeclaring<C8>>): M@JvmName(name = "_aggregateColumns9To") inline fun <E : Any, T : BaseTable<E>, K : Any, C1 : Any, C2 : Any, C3 : Any, C4 : Any, C5 : Any, C6 : Any, C7 : Any, C8 : Any, C9 : Any, M : MutableMap<in K?, in Tuple9<C1?, C2?, C3?, C4?, C5?, C6?, C7?, C8?, C9?>>> EntityGrouping<E, T, K>.aggregateColumnsTo(destination: M, aggregationSelector: (T) -> Tuple9<ColumnDeclaring<C1>, ColumnDeclaring<C2>, ColumnDeclaring<C3>, ColumnDeclaring<C4>, ColumnDeclaring<C5>, ColumnDeclaring<C6>, ColumnDeclaring<C7>, ColumnDeclaring<C8>, ColumnDeclaring<C9>>): MGroup elements from the source sequence by key and perform the given aggregations for elements in each group, then store the results in the destination map.
The key for each group is provided by the EntityGrouping.keySelector function, and the generated SQL is like: select key, aggregation from source group by key
.
Ktorm supports aggregating two or more columns, we just need to wrap our aggregate expressions by tupleOf in the closure, then the function’s return type becomes Map<K?, TupleN<C1?, C2?, .. Cn?>>
.
Return
the destination map associating the key of each group with the result of aggregations of the group elements.
Since
3.1.0
Parameters
a function that accepts the source table and returns a tuple of aggregate expressions.
Group elements from the source sequence by key and perform the given aggregation for elements in each group, then store the results in the destination map.
The key for each group is provided by the EntityGrouping.keySelector function, and the generated SQL is like: select key, aggregation from source group by key
.
Ktorm also supports aggregating two or more columns, we just need to wrap our aggregate expressions by tupleOf in the closure, then the function’s return type becomes Map<K?, TupleN<C1?, C2?, .. Cn?>>
.
Return
the destination map associating the key of each group with the result of aggregation of the group elements.
Parameters
a function that accepts the source table and returns the aggregate expression.