fields

fun fields(vararg projections: Bson): Bson

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

Return

the combined projection

Parameters

projections

the list of projections to combine


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

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

Return

the combined projection @mongodb.driver.manual

Parameters

projections

the list of projections to combine