Sha256: 03ad423dd328f3dfbd94aa582ab6be2174ab2ddca75df0498f628fb26a23e2ea

Contents?: true

Size: 581 Bytes

Versions: 16

Compression:

Stored size: 581 Bytes

Contents

#!/usr/bin/env ruby

require File.join(File.dirname(__FILE__), '_common.rb')
db = Mongo.new(DEFAULT_HOST, DEFAULT_PORT).db(DEFAULT_DB)

if $DEBUG
  3.times { |i| db.drop_collection("test#{i+1}") }
  db.create_collection('test1')
  db.collection('test2').insert({:name => 'a'})
  c = db.collection('test3')
  100.times { |i| c.insert(:i => i, :foo => 'bar') }
end

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}})

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
animehunter-mongo-0.9 tests/mongo-qa/count1
mongodb-mongo-0.10.1 tests/mongo-qa/count1
mongodb-mongo-0.10 tests/mongo-qa/count1
mongodb-mongo-0.11.1 tests/mongo-qa/count1
mongodb-mongo-0.11 tests/mongo-qa/count1
mongodb-mongo-0.12 tests/mongo-qa/count1
mongodb-mongo-0.6.1 tests/mongo-qa/count1
mongodb-mongo-0.6.2 tests/mongo-qa/count1
mongodb-mongo-0.6.3 tests/mongo-qa/count1
mongodb-mongo-0.6.4 tests/mongo-qa/count1
mongodb-mongo-0.6.5 tests/mongo-qa/count1
mongodb-mongo-0.6.6 tests/mongo-qa/count1
mongodb-mongo-0.6.7 tests/mongo-qa/count1
mongodb-mongo-0.7 tests/mongo-qa/count1
mongodb-mongo-0.8 tests/mongo-qa/count1
mongodb-mongo-0.9 tests/mongo-qa/count1