Module Mongo::Lint
In: lib/mongo/lint.rb

@api private

Methods

Public Instance methods

Validates the provided hash as a read concern object, per the read/write concern specification (github.com/mongodb/specifications/blob/master/source/read-write-concern/read-write-concern.rst#read-concern).

This method also accepts nil as input for convenience.

The read concern document as sent to the server may include additional fields, for example afterClusterTime. These fields are generated internally by the driver and cannot be specified by the user (and would potentially lead to incorrect behavior if they were specified by the user), hence this method prohibits them.

@param [ Hash ] read_concern The read concern options hash,

  with the following optional keys:
  - *:level* -- the read preference level as a symbol; valid values
     are *:local*, *:majority*, and *:snapshot*

@raise [ Error::LintError ] If the validation failed.

[Validate]