Module: Mongo::JavaImpl::Db_

Included in:
DB
Defined in:
lib/jmongo/mongo/db.rb

Constant Summary collapse

SYSTEM_NAMESPACE_COLLECTION =
"system.namespaces"
SYSTEM_PROFILE_COLLECTION =
"system.profile"

Instance Method Summary collapse

Instance Method Details

#write_concern(safe_) ⇒ Object

@collection.save(=> ‘foo’, :safe => nil) —> NONE = new WriteConcern(-1) @collection.save(=> ‘foo’, :safe => true) —> NORMAL = new WriteConcern(0) @collection.save(=> ‘foo’, :safe => => 2) —> new WriteConcern( 2 , 0 , false) @collection.save(=> ‘foo’, :safe => => 2, :wtimeout => 200) —> new WriteConcern( 2 , 200 , false) @collection.save(=> ‘foo’, :safe => => 2, :wtimeout => 200, :fsync => true) —> new WriteConcern( 2 , 0 , true) @collection.save(=> ‘foo’, :safe => => true) —> FSYNC_SAFE = new WriteConcern( 1 , 0 , true)



16
17
18
# File 'lib/jmongo/mongo/db.rb', line 16

def write_concern(safe_)
  self.class.write_concern(safe_ || self.safe || @connection.write_concern)
end