English | 简体中文

api-docs / org.ktorm.dsl / associate

associate

inline fun <K, V> Query.associate(
    transform: (row: QueryRowSet) -> Pair<K, V>
): Map<K, V>
(source code)

Return a Map containing key-value pairs provided by transform function applied to rows of the query.

If any of two pairs would have the same key the last one gets added to the map.

The returned map preserves the entry iteration order of the original query results.

Since
3.0.0