module Mongo::Operation::GetMore::CommandBuilder

@api private

Private Instance Methods

selector(connection) click to toggle source
# 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