Module Mongo::Collection::View::Builder::Modifiers
In: lib/mongo/collection/view/builder/modifiers.rb

Provides behavior for mapping modifiers.

@since 2.2.0

Methods

Constants

DRIVER_MAPPINGS = BSON::Document.new( sort: '$orderby', hint: '$hint', comment: '$comment', snapshot: '$snapshot', max_scan: '$maxScan', max_value: '$max', min_value: '$min', max_time_ms: '$maxTimeMS', return_key: '$returnKey', show_disk_loc: '$showDiskLoc', explain: '$explain'   Mappings from driver options to legacy server values.

@since 2.2.0

SERVER_MAPPINGS = BSON::Document.new(DRIVER_MAPPINGS.invert).freeze   Mappings from server values to driver options.

@since 2.2.0

Public Class methods

Transform the provided server modifiers to driver options.

@example Transform to driver options.

  Modifiers.map_driver_options(modifiers)

@param [ Hash ] modifiers The modifiers.

@return [ BSON::Document ] The driver options.

@since 2.2.0

Transform the provided options into a document of only server modifiers.

@example Map the server modifiers.

  Modifiers.map_server_modifiers(options)

@param [ Hash, BSON::Document ] options The options.

@return [ BSON::Document ] The modifiers.

@since 2.2.0

[Validate]