class Moped::Collection
Public Instance Methods
aggregate(*pipeline)
click to toggle source
# File lib/patches/aggregate_cursor.rb, line 7 def aggregate(*pipeline) pipeline.flatten! command = { aggregate: name.to_s, pipeline: pipeline, cursor: {} } result = database.session.command(command)['cursor'] result = result['firstBatch'] if result result end