Module Mongo::Support
In: lib/mongo/util/support.rb

Methods

Included Modules

Mongo::Conversions

Constants

SECONDARY_OK_COMMANDS = [ 'group', 'aggregate', 'collstats', 'dbstats', 'count', 'distinct', 'geonear', 'geosearch', 'geowalk', 'mapreduce', 'replsetgetstatus', 'ismaster', ]   Commands that may be sent to replica-set secondaries, depending on read preference and tags. All other commands are always run on the primary.

Public Instance methods

Generate an MD5 for authentication.

@param [String] username @param [String] password @param [String] nonce

@return [String] a key for db authentication.

Return a hashed password for auth.

@param [String] username @param [String] plaintext

@return [String]

Determine if a database command has succeeded by checking the document response.

@param [Hash] doc

@return [Boolean] true if the ‘ok’ key is either 1 or true.

[Validate]