slice

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

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

Return

the projection @mongodb.driver.manual reference/operator/projection/slice Slice

Parameters

limit

the number of elements to project.


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

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

Return

the projection @mongodb.driver.manual reference/operator/projection/slice Slice

Parameters

skip

the number of elements to skip before applying the limit

limit

the number of elements to project