Class Mongo::Protocol::KillCursors::Upconverter
In: lib/mongo/protocol/kill_cursors.rb
Parent: Object

Converts legacy insert messages to the appropriare OP_COMMAND style message.

@since 2.1.0

Methods

command   new  

Constants

KILL_CURSORS = 'killCursors'.freeze   The kill cursors constant.

@since 2.2.0

CURSORS = 'cursors'.freeze   The cursors constant.

@since 2.2.0

Attributes

collection  [R]  @return [ String ] collection The name of the collection.
cursor_ids  [R]  @return [ Array<Integer> ] cursor_ids The cursor ids.

Public Class methods

Instantiate the upconverter.

@example Instantiate the upconverter.

  Upconverter.new('users', [ 1, 2, 3 ])

@param [ String ] collection The name of the collection. @param [ Array<Integer> ] cursor_ids The cursor ids.

@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]