Sha256: bbd56bd69593a7b047816055245db74d7c97a132997c63c7a05f14a1f9e1c17b

Contents?: true

Size: 530 Bytes

Versions: 16

Compression:

Stored size: 530 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
  db.drop_collection('capped1')
  db.drop_collection('capped2')
end

db.create_collection('capped1', :capped => true, :size => 500)
coll = db.collection('capped1')
coll.insert('x' => 1)
coll.insert('x' => 2)

db.create_collection('capped2', :capped => true, :size => 1000, :max => 11)
coll = db.collection('capped2')
str = ''
100.times {
  coll.insert('dashes' => str)
  str << '-'
}

Version data entries

16 entries across 16 versions & 2 rubygems

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