Class: Mongo::BulkWrite::UnorderedCombiner Private
Do not use. This class is for internal use only.
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Instance Chain:
|
|
Inherits: | Object |
Defined in: | lib/mongo/bulk_write/unordered_combiner.rb |
Overview
Combines groups of bulk write operations in no order.
Constant Summary
Transformable
- Included
DELETE_MANY, DELETE_MANY_TRANSFORM, DELETE_ONE, DELETE_ONE_TRANSFORM, INSERT_ONE, INSERT_ONE_TRANSFORM, MAPPERS, REPLACE_ONE, REPLACE_ONE_TRANSFORM, UPDATE_MANY, UPDATE_MANY_TRANSFORM, UPDATE_ONE, UPDATE_ONE_TRANSFORM
Instance Attribute Summary
Combineable
- Included
Instance Method Summary
-
#combine ⇒ Array<Hash>
Internal use only
Combine the requests in order.
- #add(operations, name, document) private Internal use only
Combineable
- Included
#initialize | Create the ordered combiner. |
#combine_requests |
Validatable
- Included
#validate | Validate the document. |
#validate_document, #validate_operation |
Transformable
- Included
Instance Method Details
#add(operations, name, document) (private)
# File 'lib/mongo/bulk_write/unordered_combiner.rb', line 49
def add(operations, name, document) (operations[name] ||= []).push(transform(name, document)) operations end
#combine ⇒ Array
<Hash
>
Combine the requests in order.
# File 'lib/mongo/bulk_write/unordered_combiner.rb', line 41
def combine combine_requests({}).map do |name, ops| { name => ops } end end