distinct

fun <R : Any> distinct(fieldName: String, filter: Bson = BsonDocument(), resultClass: Class<R>): DistinctFlow<R>

Gets the distinct values of the specified field name.

Return

an iterable of distinct values

Parameters

R

the target type of the iterable.

fieldName

the field name

filter

the query filter

resultClass

the target document type of the iterable.

See also


fun <R : Any> distinct(clientSession: ClientSession, fieldName: String, filter: Bson = BsonDocument(), resultClass: Class<R>): DistinctFlow<R>

Gets the distinct values of the specified field name.

Return

an iterable of distinct values

Parameters

R

the target type of the iterable.

clientSession

the client session with which to associate this operation

fieldName

the field name

filter

the query filter

resultClass

the target document type of the iterable.

See also


inline fun <R : Any> distinct(fieldName: String, filter: Bson = BsonDocument()): DistinctFlow<R>

Gets the distinct values of the specified field name.

Return

an iterable of distinct values

Parameters

R

the target type of the iterable.

fieldName

the field name

filter

the query filter

See also


inline fun <R : Any> distinct(clientSession: ClientSession, fieldName: String, filter: Bson = BsonDocument()): DistinctFlow<R>

Gets the distinct values of the specified field name.

Return

an iterable of distinct values

Parameters

R

the target type of the iterable.

clientSession

the client session with which to associate this operation

fieldName

the field name

filter

the query filter

See also