kmongo / org.litote.kmongo / fields

fields

fun fields(vararg projections: Bson): Bson (source)

Creates a projection that combines the list of projections into a single one. If there are duplicate keys, the last one takes precedence.

Parameters

projections - the list of projections to combine

Return
the combined projection

fun fields(projections: List<Bson>): Bson (source)

Creates a projection that combines the list of projections into a single one. If there are duplicate keys, the last one takes precedence.

Parameters

projections - the list of projections to combine

Return
the combined projection

Mongodb
.driver.manual