Method: Monga::Database#drop_collection

Defined in:
lib/monga/database.rb

#drop_collection(collection_name, &blk) ⇒ Object

Obviously dropping collection There is collection#drop helper exists

db.drop_collection("testCollection"){ |err, resp| ... }
# same as
collection = db["testCollection"]
collection.drop{ |err, resp| ... }


95
96
97
98
99
# File 'lib/monga/database.rb', line 95

def drop_collection(collection_name, &blk)
  cmd = {}
  cmd[:drop] = collection_name
  run_cmd(cmd, blk)
end