Module: Mongo::WriteConcern
| Relationships & Source Files | |
| Namespace Children | |
|
Classes:
| |
| Defined in: | lib/mongo/write_concern.rb, lib/mongo/write_concern/acknowledged.rb, lib/mongo/write_concern/base.rb, lib/mongo/write_concern/unacknowledged.rb |
Overview
Base module for all write concern specific behavior.
Constant Summary
-
DEFAULT =
# File 'lib/mongo/write_concern.rb', line 61
The default write concern is to acknowledge on a single server.
{}.freeze -
FSYNC =
# File 'lib/mongo/write_concern.rb', line 44Deprecated.
The file sync write concern.
:fsync
-
GET_LAST_ERROR =
# File 'lib/mongo/write_concern.rb', line 56Deprecated.
The GLE command name.
:getlasterror
-
J =
# File 'lib/mongo/write_concern.rb', line 38Deprecated.
The journal write concern.
:j
-
W =
# File 'lib/mongo/write_concern.rb', line 32Deprecated.
The number of servers write concern.
:w
-
WTIMEOUT =
# File 'lib/mongo/write_concern.rb', line 50Deprecated.
The wtimeout write concern.
:wtimeout
Instance Method Summary
-
#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.
# File 'lib/mongo/write_concern.rb', line 86
def get() return if .is_a?(Base) return unless if ([:w] || ['w']) == 0 Unacknowledged.new() else Acknowledged.new() end end