kmongo / org.litote.kmongo / kotlin.reflect.KProperty / slice

slice

fun <T> KProperty<T>.slice(limit: Int): Bson (source)

Creates a projection to the given property of a slice of the array value of that field.

Parameters

limit - the number of elements to project.

Return
the projection

Mongodb
.driver.manual reference/operator/projection/slice Slice

fun <T> KProperty<T>.slice(skip: Int, limit: Int): Bson (source)

Creates a projection to the given property of a slice of the array value of that field.

Parameters

skip - the number of elements to skip before applying the limit

limit - the number of elements to project

Return
the projection

Mongodb
.driver.manual reference/operator/projection/slice Slice