slice

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

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

Parameters

skip

the number of elements to skip before applying the limit

limit

the number of elements to project