class Mongo::Operation::Commands::ListIndexes
A MongoDB listIndexes command operation.
@example Create the listIndexes command operation.
Mongo::Operation::Read::ListIndexes.new({ db_name: 'test', coll_name: 'example' })
@note A command is actually a query on the virtual '$cmd' collection.
Initialization:
param [ Hash ] spec The specifications for the command. option spec :coll_name [ Hash ] The name of the collection whose index info is requested. option spec :db_name [ String ] The name of the database on which the command should be executed. option spec :options [ Hash ] Options for the command.
@since 2.0.0
Private Instance Methods
selector()
click to toggle source
# File lib/mongo/operation/commands/list_indexes.rb, line 40 def selector (spec[SELECTOR] || {}).merge(listIndexes: coll_name) end