eachCountTo
fun <E : Any, T : BaseTable<E>, K : Any, M : MutableMap<in K?, Int>> EntityGrouping<E, T, K>.eachCountTo(destination: M): M(source)
Group elements from the source sequence by key and count 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, count(*) from source group by key
.
Return
the destination map associating the key of each group with the count of elements in the group.
Parameters
destination
a MutableMap used to store the results.