Module: Mongo::BulkWrite::Combineable Private
Do not use. This module is for internal use only.
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Included In:
| |
Defined in: | lib/mongo/bulk_write/combineable.rb |
Overview
Defines behavior around combiners
Instance Attribute Summary
- #has_array_filters? ⇒ Boolean readonly Internal use only
- #has_collation? ⇒ Boolean readonly Internal use only
- #has_hint? ⇒ Boolean readonly Internal use only
- #requests ⇒ Array<Hash, BSON::Document> readonly Internal use only
Instance Method Summary
-
#initialize(requests)
Internal use only
Create the ordered combiner.
- #combine_requests(ops) private Internal use only
Instance Attribute Details
#has_array_filters? ⇒ Boolean
(readonly)
# File 'lib/mongo/bulk_write/combineable.rb', line 56
def has_array_filters? @has_array_filters end
#has_collation? ⇒ Boolean
(readonly)
# File 'lib/mongo/bulk_write/combineable.rb', line 50
def has_collation? @has_collation end
#has_hint? ⇒ Boolean
(readonly)
# File 'lib/mongo/bulk_write/combineable.rb', line 62
def has_hint? @has_hint end
#requests ⇒ Array
<Hash
, BSON::Document
> (readonly)
# File 'lib/mongo/bulk_write/combineable.rb', line 29
attr_reader :requests
Instance Method Details
#combine_requests(ops) (private)
# File 'lib/mongo/bulk_write/combineable.rb', line 68
def combine_requests(ops) requests.reduce(ops) do |operations, request| add(operations, request.keys.first, request.values.first) end end
#initialize(requests)
Create the ordered combiner.