class Mongo::Operation::CollectionsInfo

A MongoDB operation to get info on all collections in a given database.

@api private

@since 2.0.0

Private Instance Methods

final_operation(connection) click to toggle source
# File lib/mongo/operation/collections_info.rb, line 36
def final_operation(connection)
   op_class = if connection.features.list_collections_enabled?
    if connection.features.op_msg_enabled?
      ListCollections::OpMsg
    else
      ListCollections::Command
    end
  else
    CollectionsInfo::Command
  end

  op_class.new(spec)
end