Method: Mongo::Collection#distinct
- Defined in:
- lib/mongo/collection.rb
#distinct(field_name, filter = nil, options = {}) ⇒ Array<Object>
Get a list of distinct values for a specific field.
771 772 773 |
# File 'lib/mongo/collection.rb', line 771 def distinct(field_name, filter = nil, = {}) View.new(self, filter || {}, ).distinct(field_name, ) end |