Class: Mongoid::Persistence::Atomic::PushAll

Inherits:
Object
  • Object
show all
Includes:
Operation
Defined in:
lib/mongoid/persistence/atomic/push_all.rb

Overview

This class provides the ability to perform an explicit $pushAll modification on a specific field.

Instance Attribute Summary

Attributes included from Operation

#document, #fields, #options, #value

Instance Method Summary collapse

Methods included from Operation

#collection, #initialize, #operation, #path, #prepare

Methods included from Atomic::Positionable

#positionally

Instance Method Details

#persistObject

Sends the atomic $pushAll operation to the database.

Examples:

Persist the new values.

pushAll.persist

Returns:

  • (Object)

    The new array value.

Since:

  • 2.1.0



19
20
21
# File 'lib/mongoid/persistence/atomic/push_all.rb', line 19

def persist
  append_with("$pushAll")
end