kmongo / org.litote.kmongo.coroutine / CoroutineCollection / distinct

distinct

fun <reified T : Any> distinct(fieldName: String, filter: Bson = EMPTY_BSON): CoroutineDistinctPublisher<T> (source)

Gets the distinct values of the specified field name.

Parameters

fieldName - the field name

filter - the query filter

Parameters

Mongodb
.driver.manual reference/command/distinct/ Distinct

fun <reified T : Any> distinct(clientSession: ClientSession, fieldName: String, filter: Bson): CoroutineDistinctPublisher<T> (source)

Gets the distinct values of the specified field name.

Parameters

clientSession - the client session with which to associate this operation

fieldName - the field name

filter - the query filter

Parameters

Mongodb
.driver.manual reference/command/distinct/ Distinct

Mongodb
.server.release 3.6

Since
1.7

fun <reified Type : Any> distinct(fieldName: String, filter: String): CoroutineDistinctPublisher<Type> (source)

Gets the distinct values of the specified field name.

Parameters

fieldName - the field name

filter - the query filter

Parameters

fun <reified Type : Any> distinct(field: KProperty1<T, Type>, filter: Bson = EMPTY_BSON): CoroutineDistinctPublisher<Type> (source)

Gets the distinct values of the specified field.

Parameters

field - the field

filter - the query filter

Parameters