| Class | Mongo::Protocol::Update::Upconverter |
| In: |
lib/mongo/protocol/update.rb
|
| Parent: | Object |
Converts legacy update messages to the appropriare OP_COMMAND style message.
@since 2.1.0
| MULTI | = | 'multi'.freeze |
The multi constant.
@since 2.2.0 |
|
| U | = | 'u'.freeze |
The u constant.
@since 2.2.0 |
|
| UPDATE | = | 'update'.freeze |
The update constant.
@since 2.2.0 |
|
| UPDATES | = | 'updates'.freeze |
The updates constant.
@since 2.2.0 |
|
| UPSERT | = | 'upsert'.freeze |
The upsert constant.
@since 2.2.0 |
| collection | [R] | @return [ String ] collection The name of the collection. |
| filter | [R] | @return [ Hash ] filter The filter. |
| flags | [R] | @return [ Array<Symbol> ] flags The flags. |
| update | [R] | @return [ Hash ] update The update. |
Instantiate the upconverter.
@example Instantiate the upconverter.
Upconverter.new(
'users',
{ name: 'test' },
{ '$set' => { 'name' => 't' }},
[]
)
@param [ String ] collection The name of the collection. @param [ Hash ] filter The filter. @param [ Hash ] update The update. @param [ Array<Symbol> ] flags The flags.
@since 2.1.0