kmongo / org.litote.kmongo / orderBy

orderBy

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

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

Parameters

sorts - the sort specifications

ascending - if the sort is ascending

Return
the combined sort specification

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

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

Parameters

sorts - the sort specifications

Return
the combined sort specification