class Mongo::Operation::Write::Command::DropIndex

A MongoDB drop index write command operation.

@example Create the drop index operation.

Write::Command::DropIndex.new({
  :index      => { :foo => 1 },
  :db_name    => 'test',
  :coll_name  => 'test_coll',
  :index_name => 'foo_1'
})

@since 2.0.0

Private Instance Methods

message(server) click to toggle source
# File lib/mongo/operation/write/command/drop_index.rb, line 47
def message(server)
  sel = update_selector_for_write_concern(selector, server)
  Protocol::Query.new(db_name, Database::COMMAND, sel, options)
end
selector() click to toggle source

The query selector for this drop index command operation.

@return [ Hash ] The selector describing this insert operation.

@since 2.0.0

# File lib/mongo/operation/write/command/drop_index.rb, line 43
def selector
  { :dropIndexes => coll_name, :index => index_name }
end