Class Mongo::Protocol::Delete::Upconverter
In: lib/mongo/protocol/delete.rb
Parent: Object

Converts legacy delete messages to the appropriare OP_COMMAND style message.

@since 2.1.0

Methods

command   new  

Constants

DELETE = 'delete'.freeze   The delete command constant.

@since 2.2.0

DELETES = 'deletes'.freeze   The deletes command constant.

@since 2.2.0

Attributes

collection  [R]  @return [ String ] collection The name of the collection.
filter  [R]  @return [ BSON::Document, Hash ] filter The query filter or command.
options  [R]  @return [ Hash ] options The options.

Public Class methods

Instantiate the upconverter.

@example Instantiate the upconverter.

  Upconverter.new('users', { name: 'test' })

@param [ String ] collection The name of the collection. @param [ BSON::Document, Hash ] filter The filter or command.

@since 2.1.0

Public Instance methods

Get the upconverted command.

@example Get the command.

  upconverter.command

@return [ BSON::Document ] The upconverted command.

@since 2.1.0

[Validate]