123456789_123456789_123456789_123456789_123456789_

Module: Mongo::Operation::GetMore::CommandBuilder Private

Do not use. This module is for internal use only.
Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Included In:
Defined in: lib/mongo/operation/get_more/command_builder.rb

Overview

Since:

  • 2.5.0

Instance Method Summary

Instance Method Details

#selector(connection) (private)

Since:

  • 2.5.0

[ GitHub ]

  
# File 'lib/mongo/operation/get_more/command_builder.rb', line 27

def selector(connection)
  {
    getMore: BSON::Int64.new(spec.fetch(:cursor_id)),
    collection: spec.fetch(:coll_name),
    batchSize: spec[:batch_size],
    maxTimeMS: spec[:max_time_ms],
  }.compact.tap do |sel|
    if spec[:comment] && connection.features.get_more_comment_enabled?
      sel[:comment] = spec[:comment]
    end
  end
end