123456789_123456789_123456789_123456789_123456789_

Module: Mongo::Operation::WriteConcernSupported Private

Do not use. This module is for internal use only.
Relationships & Source Files
Defined in: lib/mongo/operation/shared/write_concern_supported.rb

Overview

Custom behavior for operations that support write concern.

Since:

  • 2.5.2

Instance Method Summary

Instance Method Details

#add_write_concern!(sel, connection) (private)

Since:

  • 2.5.2

[ GitHub ]

  
# File 'lib/mongo/operation/shared/write_concern_supported.rb', line 35

def add_write_concern!(sel, connection)
  if write_concern && write_concern_supported?(connection)
    sel[:writeConcern] = write_concern.options
  end
  sel
end

#command(connection) (private)

Since:

  • 2.5.2

[ GitHub ]

  
# File 'lib/mongo/operation/shared/write_concern_supported.rb', line 31

def command(connection)
  add_write_concern!(super, connection)
end

#write_concern_supported?(connection) ⇒ Boolean (private)

Since:

  • 2.5.2

[ GitHub ]

  
# File 'lib/mongo/operation/shared/write_concern_supported.rb', line 29

def write_concern_supported?(connection); true; end