Module | Mongo::Support |
In: |
lib/mongo/util/support.rb
|
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. |
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.