Module | Mongoid::Safety |
In: |
lib/mongoid/safety.rb
|
Execute the following instance-level persistence operation in safe mode.
@example Upsert in safe mode.
person.safely.upsert
@example Destroy in safe mode with w and fsync options.
person.safely(:w => 2, :fsync => true).destroy
@param [ Hash ] options The safe mode options.
@option options [ Integer ] :w The number of nodes to write to. @option options [ Integer ] :wtimeout Time to wait for return from all
nodes.
@option options [ true, false ] :fsync Should a fsync occur.
@return [ Proxy ] The safety proxy.