| Class | Mongo::Protocol::Delete |
| In: |
lib/mongo/protocol/delete.rb
|
| Parent: | Message |
MongoDB Wire protocol Delete message.
This is a client request message that is sent to the server in order to delete selected documents in the specified namespace.
The operation, by default, operates on many documents. Setting the +:single_remove+ flag allows for a single matching document to be removed.
@api semipublic
| upconverter | [R] |
@example Remove all users named Tyler.
Query.new('xgen', 'users', {:name => 'Tyler'})
@param database [String, Symbol] The database to remove from. @param collection [String, Symbol] The collection to remove from. @param selector [Hash] The query used to select doc(s) to remove. @param options [Hash] The additional delete options.
@option options :flags [Array] The flags for the delete message.
Supported flags: +:single_remove+