inline fun <reified F : Any> CoroutineCollection<*>.projection(property: KProperty<F?>, query: Bson = EMPTY_BSON, options: (CoroutineFindPublisher<SingleProjection<F>>) -> CoroutineFindPublisher<SingleProjection<F>> = { it }): CoroutineFindPublisher<F>
(source)
Returns the specified field for all matching documents.
property
- the property to return
query
- the optional find query
options
- the optional CoroutineFindPublisher modifiers
Return
a property value CoroutineFindPublisher
inline fun <reified F1 : Any, reified F2 : Any> CoroutineCollection<*>.projection(property1: KProperty<F1?>, property2: KProperty<F2?>, query: Bson = EMPTY_BSON, options: (CoroutineFindPublisher<PairProjection<F1, F2>>) -> CoroutineFindPublisher<PairProjection<F1, F2>> = { it }): CoroutineFindPublisher<Pair<F1?, F2?>>
(source)
Returns the specified two fields for all matching documents.
property1
- the first property to return
property2
- the second property to return
query
- the optional find query
options
- the optional CoroutineFindPublisher modifiers
Return
a pair of property values CoroutineFindPublisher
inline fun <reified F1 : Any, reified F2 : Any, reified F3 : Any> CoroutineCollection<*>.projection(property1: KProperty<F1?>, property2: KProperty<F2?>, property3: KProperty<F3?>, query: Bson = EMPTY_BSON, options: (CoroutineFindPublisher<TripleProjection<F1, F2, F3>>) -> CoroutineFindPublisher<TripleProjection<F1, F2, F3>> = { it }): CoroutineFindPublisher<Triple<F1?, F2?, F3?>>
(source)
Returns the specified three fields for all matching documents.
property1
- the first property to return
property2
- the second property to return
property3
- the third property to return
query
- the optional find query
options
- the optional CoroutineFindPublisher modifiers
Return
a triple of property values CoroutineFindPublisher