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 =
The default write concern is to acknowledge on a single server.
{ }.freeze
-
FSYNC =
Deprecated.
The file sync write concern.
:fsync.freeze
-
GET_LAST_ERROR =
Deprecated.
The GLE command name.
:getlasterror.freeze
-
J =
Deprecated.
The journal write concern.
:j.freeze
-
W =
Deprecated.
The number of servers write concern.
:w.freeze
-
WTIMEOUT =
Deprecated.
The wtimeout write concern.
:wtimeout.freeze
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 88
def get( ) return if .is_a?(Base) if if ( [:w] || ['w']) == 0 Unacknowledged.new( ) else Acknowledged.new( ) end end end