mongo-ruby-driver/tests/mongo-qa/count1

11 lines
353 B
Plaintext
Raw Normal View History

#!/usr/bin/env ruby
require File.join(File.dirname(__FILE__), '_common.rb')
db = Mongo.new(DEFAULT_HOST, DEFAULT_PORT).db(DEFAULT_DB)
puts db.collection('test1').count
puts db.collection('test2').count
puts db.collection('test3').count('i' => 'a')
puts db.collection('test3').count('i' => 3)
puts db.collection('test3').count({'i' => {'$gte' => 67}})