Module: Mongo::WriteConcern
- Extended by:
- WriteConcern
- Included in:
- WriteConcern
- Defined in:
- lib/mongo/write_concern.rb,
lib/mongo/write_concern/base.rb,
lib/mongo/write_concern/acknowledged.rb,
lib/mongo/write_concern/unacknowledged.rb
Overview
Base module for all write concern specific behavior.
Defined Under Namespace
Classes: Acknowledged, Base, Unacknowledged
Constant Summary collapse
- W =
Deprecated.
The number of servers write concern.
:w.freeze
- J =
Deprecated.
The journal write concern.
:j.freeze
- FSYNC =
Deprecated.
The file sync write concern.
:fsync.freeze
- WTIMEOUT =
Deprecated.
The wtimeout write concern.
:wtimeout.freeze
- GET_LAST_ERROR =
Deprecated.
The GLE command name.
:getlasterror.freeze
- DEFAULT =
The default write concern is to acknowledge on a single server.
{ }.freeze
Instance Method Summary collapse
-
#get(options) ⇒ nil | Unacknowledged | Acknowledged
Create a write concern object for the provided options.
Instance Method Details
#get(options) ⇒ nil | Unacknowledged | Acknowledged
Create a write concern object for the provided options.
If options are nil, returns nil.
88 89 90 91 92 93 94 95 96 97 |
# File 'lib/mongo/write_concern.rb', line 88 def get() return if .is_a?(Base) if if ([:w] || ['w']) == 0 Unacknowledged.new() else Acknowledged.new() end end end |