Method: Mongo::Collection::View::Builder::MapReduce#specification
- Defined in:
- lib/mongo/collection/view/builder/map_reduce.rb
#specification ⇒ Hash
Get the specification to pass to the map/reduce operation.
82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/mongo/collection/view/builder/map_reduce.rb', line 82 def specification spec = { selector: map_reduce_command, db_name: database.name, # Note that selector just above may also have a read preference # specified, per the #map_reduce_command method below. read: read, session: [:session] } write?(spec) ? spec.merge!(write_concern: write_concern) : spec end |