EntityGrouping
Wraps an EntitySequence with a keySelector function, which can be applied to each record to get its key, or used as the group by
clause of the generated SQL.
An EntityGrouping structure serves as an intermediate step in group-and-fold operations: they group elements by their keys and then fold each group with some aggregation operation.
Entity groups are created by attaching keySelector: (T) -> ColumnDeclaring<K>
function to an entity sequence. To get an instance of EntityGrouping, use the extension function EntitySequence.groupingBy.
For the list of group-and-fold operations available, see the extension functions below.
Properties
Functions
Groups elements from the source sequence by key and applies operation to the elements of each group sequentially, passing the previously accumulated value and the current element as arguments, and stores the results in a new map.
Group elements from the source sequence by key and perform the given aggregations for elements in each group, then store the results in a new Map.
Group elements from the source sequence by key and perform the given aggregation for elements in each group, then store the results in a new Map.
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.
Group 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.
Groups elements from the source sequence by key and applies operation to the elements of each group sequentially, passing the previously accumulated value and the current element as arguments, and stores the results in the given destination map.
Create a kotlin.collections.Grouping instance that wraps this original entity grouping returning all the elements in the source sequence when being iterated.
Group elements from the source sequence by key and average the columns or expressions provided by the columnSelector function for elements in each group.
Group elements from the source sequence by key and average the columns or expressions provided by the columnSelector function for elements in each group, then store the results in the destination map.
Group elements from the source sequence by key and count elements in each group, then store the results in the destination map.
Group elements from the source sequence by key and get the max value of the columns or expressions provided by the columnSelector function for elements in each group.
Group elements from the source sequence by key and get the max value of the columns or expressions provided by the columnSelector function for elements in each group, then store the results in the destination map.
Group elements from the source sequence by key and get the min value of the columns or expressions provided by the columnSelector function for elements in each group.
Group elements from the source sequence by key and get the min value of the columns or expressions provided by the columnSelector function for elements in each group, then store the results in the destination map.
Group elements from the source sequence by key and sum the columns or expressions provided by the columnSelector function for elements in each group, then store the results in the destination map.
Groups elements from the source sequence by key and applies operation to the elements of each group sequentially, passing the previously accumulated value and the current element as arguments, and stores the results in a new map. An initial value of accumulator is the same initialValue for each group.
Groups elements from the source sequence by key and applies operation to the elements of each group sequentially, passing the previously accumulated value and the current element as arguments, and stores the results in a new map. An initial value of accumulator is provided by initialValueSelector function.
Groups elements from the source sequence by key and applies operation to the elements of each group sequentially, passing the previously accumulated value and the current element as arguments, and stores the results in the given destination map. An initial value of accumulator is the same initialValue for each group.
Groups elements from the source sequence by key and applies operation to the elements of each group sequentially, passing the previously accumulated value and the current element as arguments, and stores the results in the given destination map. An initial value of accumulator is provided by initialValueSelector function.
Groups elements from the source sequence by key and applies the reducing operation to the elements of each group sequentially starting from the second element of the group, passing the previously accumulated value and the current element as arguments, and stores the results in a new map. An initial value of accumulator is the first element of the group.
Groups elements from the source sequence by key and applies the reducing operation to the elements of each group sequentially starting from the second element of the group, passing the previously accumulated value and the current element as arguments, and stores the results in the given destination map. An initial value of accumulator is the first element of the group.