lib/mongo/collection.rb
# Get the write concern for the collection, given the session.
#
# If the session is in a transaction and the collection
# has an unacknowledged write concern, remove the write
# concern's :w option. Otherwise, return the unmodified
# write concern.
#
# @return [ Mongo::WriteConcern ] The write concern.
#
# @api private
Get the write concern for the collection, given the session.
If the session is in a transaction and the collection
has an unacknowledged write concern, remove the write
concern's :w option. Otherwise, return the unmodified
write concern.
Get the write concern for the collection given the session . If the session is in a transaction and the collection has an unacknowledged write concern remove the write concern ' s : w option . Otherwise return the unmodified write concern .
def write_concern_with_session(session)
      wc = write_concern
      if session && session.in_transaction?
        if wc && !wc.acknowledged?
          opts = wc.options.dup
          opts.delete(:w)
          return WriteConcern.get(opts)
        end
      end
      wc
    end
def write_concern_with_session ( session ) wc = write_concern if session && session . in_transaction? if wc && ! wc . acknowledged? opts = wc . options . dup opts . delete ( :w ) return WriteConcern . get ( opts ) end end wc end
Get the write concern for the collection, given the session.
Get the write concern for the collection given the session .
The write concern.
The write concern .
 Mongo::WriteConcern 
session
<not_specific>
api
None