Sha256: 74b06d5eb53b8bd704e60b5c24c14c718200512a826d0c1528f2956275317695
Contents?: true
Size: 601 Bytes
Versions: 6
Compression:
Stored size: 601 Bytes
Contents
#!/usr/bin/env ruby require File.join(File.dirname(__FILE__), '_common.rb') db = Connection.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').find('i' => 'a').count puts db.collection('test3').find('i' => 3).count puts db.collection('test3').find({'i' => {'$gte' => 67}}).count
Version data entries
6 entries across 6 versions & 3 rubygems