mongodb/mongo-ruby-driver — pull request #405 by estolfo (2014-04-28 17:13:40+00:00)
Title: Operations Draft

This is a draft of Operations models. The Insert and Update write operations and Insert and Update write commands are not pushed yet. They will be very similar to the Delete write operation and Delete write command.

#### Namespaces:
Top level namespaces are Read and Write
Write then has a WriteCommand namespace

#### Functional Modules:
Executable is a functional module that is included in most Operation classes.

### Classes

* Aggregate (sometimes a read, sometimes a write)
* MapReduce (sometimes a read, sometimes a write)

#### Read

* Query
* GetMore

#### Write

* Delete
* Insert (not yet pushed)
* Update (not yet pushed)
* WriteCommand namespace
* Delete
* Insert (not yet pushed)
* Update (not yet pushed)

### Notes about #execute
The write operations (delete, update, insert) check out a connection from the provided client and check the wire version. If the a write command should be used instead, a write command message is constructed and sent on the connection (/socket).

#### Todo
* Insert, Update write operations
* Insert, Update write commands
* Refactor rspec tests to use a shared set.
* Updates after the read preference code is merged.
* Documentation
* Updates after the connection API is defined. Especially for the exhaust query option.