| Class | Mongo::Protocol::Insert::Upconverter |
| In: |
lib/mongo/protocol/insert.rb
|
| Parent: | Object |
Converts legacy insert messages to the appropriare OP_COMMAND style message.
@since 2.1.0
| INSERT | = | 'insert'.freeze |
Insert field constant.
@since 2.1.0 |
|
| DOCUMENTS | = | 'documents'.freeze |
Documents field constant.
@since 2.1.0 |
|
| WRITE_CONCERN | = | 'writeConcern'.freeze |
Write concern field constant.
@since 2.1.0 |
| collection | [R] | @return [ String ] collection The name of the collection. |
| documents | [R] | @return [ Array<BSON::Document> ] documents The documents to insert. |
| options | [R] | @return [ Hash ] options The options. |
Instantiate the upconverter.
@example Instantiate the upconverter.
Upconverter.new('users', documents)
@param [ String ] collection The name of the collection. @param [ Array<BSON::Document> ] documents The documents. @param [ Hash ] options The options.
@since 2.1.0