class Mongo::Operation::Write::Command::RemoveUser
Remove user commands on non-legacy servers.
@since 2.0.0
Public Instance Methods
execute(server)
click to toggle source
Execute the operation.
@example Execute the operation.
operation.execute(server)
@param [ Mongo::Server
] server The server to send this operation to.
@return [ Result
] The operation response, if there is one.
@since 2.5.0
# File lib/mongo/operation/write/command/remove_user.rb, line 37 def execute(server) result = Result.new(server.with_connection do |connection| connection.dispatch([ message(server) ], operation_id) end) server.update_cluster_time(result) session.process(result) if session result.validate! end
Private Instance Methods
selector()
click to toggle source
The query selector for this drop user command operation.
@return [ Hash ] The selector describing this drop user operation.
@since 2.0.0
# File lib/mongo/operation/write/command/remove_user.rb, line 53 def selector { :dropUser => user_name } end