distinct

abstract fun <TResult : Any> distinct(fieldName: String, resultClass: KClass<out TResult>): DistinctFlow<TResult>

Gets the distinct values of the specified field name.

Return

an iterable of distinct values

Parameters

fieldName

the field name

resultClass

the default class to cast any distinct items into.

the target type of the iterable.

abstract fun <TResult : Any> distinct(    fieldName: String,     filter: Bson,     resultClass: KClass<out TResult>): DistinctFlow<TResult>

Gets the distinct values of the specified field name.

Return

an iterable of distinct values

Parameters

fieldName

the field name

filter

the query filter

resultClass

the default class to cast any distinct items into.

the target type of the iterable.

abstract fun <TResult : Any> distinct(    clientSession: ClientSession,     fieldName: String,     resultClass: KClass<out TResult>): DistinctFlow<TResult>

Gets the distinct values of the specified field name.

Return

an iterable of distinct values

Since

3.6

Parameters

clientSession

the client session with which to associate this operation

fieldName

the field name

resultClass

the default class to cast any distinct items into.

the target type of the iterable.

abstract fun <TResult : Any> distinct(    clientSession: ClientSession,     fieldName: String,     filter: Bson,     resultClass: KClass<out TResult>): DistinctFlow<TResult>

Gets the distinct values of the specified field name.

Return

an iterable of distinct values

Since

3.6

Parameters

clientSession

the client session with which to associate this operation

fieldName

the field name

filter

the query filter

resultClass

the default class to cast any distinct items into.

the target type of the iterable.