orderBy

fun orderBy(vararg sorts: KProperty<*>, ascending: Boolean = true): Bson
fun orderBy(sorts: List<KProperty<*>>, ascending: Boolean = true): Bson

Combine multiple sort specifications. If any properties are repeated, the last one takes precedence.

Return

the combined sort specification

Parameters

sorts

the sort specifications

ascending

if the sort is ascending


fun orderBy(sorts: Map<out KProperty<Any?>, Boolean>): Bson

Combine multiple sort specifications. If any properties are repeated, the last one takes precedence.

Return

the combined sort specification

Parameters

sorts

the sort specifications