kmongo / org.litote.kmongo / com.mongodb.client.FindIterable

Extensions for com.mongodb.client.FindIterable

ascendingSort

Sets the sort criteria with specified ascending properties to apply to the query.

fun <T> FindIterable<T>.ascendingSort(vararg properties: KProperty<*>): FindIterable<T>

descendingSort

Sets the sort criteria with specified descending properties to apply to the query.

fun <T> FindIterable<T>.descendingSort(vararg properties: KProperty<*>): FindIterable<T>

filter

Sets the query filter to apply to the query.

fun <T> FindIterable<T>.filter(filter: String): FindIterable<T>

projection

Sets a document describing the fields to return for all matching documents.

fun <T> FindIterable<T>.projection(projection: String): FindIterable<T>
fun <T> FindIterable<T>.projection(vararg projections: KProperty<*>): FindIterable<T>

sort

Sets the sort criteria to apply to the query.

fun <T> FindIterable<T>.sort(sort: String): FindIterable<T>