module Mongo::Commands::Distinct


Finds the distinct values for a specified field across a single collection, and returns a document that contains an array of the distinct values. The return document also contains an embedded document with query statistics and the query plan.

NOTE for more details, please check the official MongoDB documentation.

Extended Modules

Defined in:


Class Method Summary

Instance Method Summary

Class Method Detail

def #

Instance Method Detail

def command(database : String, collection : Collection::CollectionKey, key : String, options = nil) #

Returns a pair of OP_MSG body and sequences associated with the command and arguments.

def result(bson : BSON) #

Transforms the server result.