Module: Mongo::Operation::Find::Builder::Modifiers Private
Do not use. This module is for internal use only.
Relationships & Source Files | |
Defined in: | lib/mongo/operation/find/builder/modifiers.rb |
Overview
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
-
DRIVER_MAPPINGS =
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 =
Mappings from OP_QUERY modifiers to Ruby options.
BSON::Document.new(DRIVER_MAPPINGS.invert).freeze