distinct
inline fun <TResult : Any> MongoCollection<*>.distinct(fieldName: String, filter: String = KMongoUtil.EMPTY_JSON): 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
inline fun <T : Any, TResult : Any> MongoCollection<T>.distinct(field: KProperty1<T, TResult?>, filter: Bson = EMPTY_BSON): DistinctFlow<TResult>
Gets the distinct values of the specified field.
Return
an iterable of distinct values
Parameters
field
the field
filter
the query filter
inline fun <TResult : Any> MongoCollection<*>.distinct(clientSession: ClientSession, fieldName: String, filter: String = KMongoUtil.EMPTY_JSON): DistinctFlow<TResult>
Gets the distinct values of the specified field name.
Return
an iterable of distinct values
Parameters
clientSession
the client session with which to associate this operation
fieldName
the field name
filter
the query filter
inline fun <T : Any, TResult : Any> MongoCollection<T>.distinct(clientSession: ClientSession, field: KProperty1<T, TResult?>, filter: Bson = EMPTY_BSON): DistinctFlow<TResult>
Gets the distinct values of the specified field.
Return
an iterable of distinct values
Parameters
clientSession
the client session with which to associate this operation
field
the field
filter
the query filter