class Mongo::Operation::Explain::Legacy

A MongoDB explain command operation sent as a legacy wire protocol message.

@api private

@since 2.0.0

Private Instance Methods

message(connection) click to toggle source
# File lib/mongo/operation/explain/legacy.rb, line 35
def message(connection)
  if spec[:collation] && !connection.features.collation_enabled?
    raise Error::UnsupportedCollation
  end

  Protocol::Query.new(
    db_name,
    coll_name,
    Find::Builder::Legacy.selector(spec, connection),
    options(connection).update(
      Find::Builder::Legacy.query_options(spec, connection),
    ),
  )
end