class Mongo::BulkWrite::UnorderedCombiner
Combines groups of bulk write operations in no order.
@api private
@since 2.1.0
Public Instance Methods
combine()
click to toggle source
Combine the requests in order.
@api private
@example Combine the requests.
combiner.combine
@return [ Array<Hash> ] The combined requests.
@since 2.1.0
# File lib/mongo/bulk_write/unordered_combiner.rb, line 38 def combine combine_requests({}).map do |name, ops| { name => ops } end end
Private Instance Methods
add(operations, name, document)
click to toggle source
# File lib/mongo/bulk_write/unordered_combiner.rb, line 46 def add(operations, name, document) (operations[name] ||= []).push(transform(name, document)) operations end