Added call to db.count to example. Need to see why it's not working.
This commit is contained in:
parent
5e3815bf69
commit
8459fcad5b
|
@ -13,4 +13,8 @@ coll.insert(doc)
|
|||
doc = {'a' => 2}
|
||||
coll.insert(doc)
|
||||
|
||||
doc = {'a' => 3}
|
||||
coll.insert(doc)
|
||||
|
||||
puts coll.count()
|
||||
coll.find().each { |doc| puts doc.inspect }
|
||||
|
|
|
@ -112,7 +112,7 @@ module XGen
|
|||
doc = db_command(:count => collection, :query => selector)
|
||||
o = doc['ok']
|
||||
return doc['n'].to_i if o.to_i == 1
|
||||
raise "Error with count command: #{doc.to_s}" unless o.kind_of?(Numeric)
|
||||
raise "Error with count command: #{doc.inspect}"
|
||||
end
|
||||
|
||||
def drop_index(collection, name)
|
||||
|
|
Loading…
Reference in New Issue