Module: Mongo::Operation::Find::Builder::Modifiers Private
- Defined in:
- build/ruby-driver-master/lib/mongo/operation/find/builder/modifiers.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Provides behavior for mapping Ruby options to legacy OP_QUERY find modifiers.
This module is used in two ways:
-
When Collection#find is invoked with the legacy OP_QUERY syntax (:$query argument etc.), this module is used to map the legacy parameters into the Ruby options that normally are used by applications.
-
When sending a find operation using the OP_QUERY protocol, this module is used to map the Ruby find options to the modifiers in the wire protocol message.
Constant Summary collapse
- DRIVER_MAPPINGS =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Mappings from Ruby options to OP_QUERY modifiers.
BSON::Document.new( comment: '$comment', explain: '$explain', hint: '$hint', max_scan: '$maxScan', max_time_ms: '$maxTimeMS', max_value: '$max', min_value: '$min', return_key: '$returnKey', show_disk_loc: '$showDiskLoc', snapshot: '$snapshot', sort: '$orderby', ).freeze
- SERVER_MAPPINGS =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Mappings from OP_QUERY modifiers to Ruby options.
BSON::Document.new(DRIVER_MAPPINGS.invert).freeze