class Mongo::Operation::Update::Legacy
A MongoDB update operation sent as a legacy wire protocol message.
@api private
@since 2.5.2
Private Instance Methods
gle()
click to toggle source
# File lib/mongo/operation/update/legacy.rb, line 51 def gle wc = write_concern || WriteConcern.get(WriteConcern::DEFAULT) if gle_message = wc.get_last_error Protocol::Query.new( db_name, Database::COMMAND, gle_message, options.merge(limit: -1) ) end end
message(server)
click to toggle source
# File lib/mongo/operation/update/legacy.rb, line 37 def message(server) flags = [] flags << :multi_update if selector[Operation::MULTI] flags << :upsert if selector[Operation::UPSERT] Protocol::Update.new( db_name, coll_name, selector[Operation::Q], selector[Operation::U], flags.empty? ? {} : { flags: flags } ) end
selector()
click to toggle source
# File lib/mongo/operation/update/legacy.rb, line 33 def selector send(IDENTIFIER).first end