| Class | Mongo::Collection::View::Builder::FindCommand |
| In: |
lib/mongo/collection/view/builder/find_command.rb
|
| Parent: | Object |
Builds a find command specification from options.
@since 2.2.0
| MAPPINGS | = | BSON::Document.new( sort: 'sort', projection: 'projection', hint: 'hint', skip: 'skip', limit: 'limit', batch_size: 'batchSize', single_batch: 'singleBatch', comment: 'comment', max_scan: 'maxScan', max_time_ms: 'maxTimeMS', max_value: 'max', min_value: 'min', return_key: 'returnKey', show_disk_loc: 'showRecordId', snapshot: 'snapshot', tailable: 'tailable', tailable_cursor: 'tailable', oplog_replay: 'oplogReplay', no_cursor_timeout: 'noCursorTimeout', await_data: 'awaitData', allow_partial_results: 'allowPartialResults', collation: 'collation' |
The mappings from ruby options to the find command.
@since 2.2.0 |
Create the find command builder.
@example Create the find command builder.
FindCommandBuilder.new(view)
@param [ Collection::View ] view The collection view. @param [ Session ] session The session.
@since 2.2.2
Get the specification for an explain command that wraps the find command.
@example Get the explain spec.
builder.explain_specification
@return [ Hash ] The specification.
@since 2.2.0
Get the specification to pass to the find command operation.
@example Get the specification.
builder.specification
@return [ Hash ] The specification.
@since 2.2.0