lib/mongo/db.rb
# DB commands need to be ordered, so selector must be an OrderedHash
# (or a Hash with only one element). What DB commands really need is
# that the "command" key be first.
#
# Do not call this. Intended for driver use only.
DB commands need to be ordered, so selector must be an OrderedHash
(or a Hash with only one element). What DB commands really need is
that the "command" key be first.

Do not call this. Intended for driver use only.
DB commands need to be ordered so selector must be an OrderedHash ( or a Hash with only one element ) . What DB commands really need is that the " command " key be first . Do not call this . Intended for driver use only .
def db_command(selector)
          if !selector.kind_of?(OrderedHash)
            if !selector.kind_of?(Hash) || selector.keys.length > 1
              raise "db_command must be given an OrderedHash when there is more than one key"
            end
          end
          q = Query.new(selector)
          q.number_to_return = 1
          query(Collection.new(self, SYSTEM_COMMAND_COLLECTION), q).next_object
        end
def db_command ( selector ) if ! selector . kind_of? ( OrderedHash ) if ! selector . kind_of? ( Hash ) || selector . keys . length > 1 raise "db_command must be given an OrderedHash when there is more than one key" end end q = Query . new ( selector ) q . number_to_return = 1 query ( Collection . new ( self , SYSTEM_COMMAND_COLLECTION ) , q ) . next_object end
DB commands need to be ordered, so selector must be an OrderedHash
(or a Hash with only one element).
DB commands need to be ordered so selector must be an OrderedHash ( or a Hash with only one element ) .
selector
<not_specific>