File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,21 @@ def inspect
9292
9393 # Modify the query selector for subsequent bulk write operations.
9494 # The default query selector on creation of the bulk write view is {}.
95+ # For operations that require a query selector, find() must be set
96+ # per operation, or set once for all operations on the bulk object.
97+ # For example, these operations:
98+ #
99+ # bulk.find({"a" => 2}).update({"$inc" => {"x" => 2}})
100+ # bulk.find({"a" => 2}).update({"$set" => {"b" => 3}})
101+ #
102+ # may be rewritten as:
103+ #
104+ # bulk = find({"a" => 2})
105+ # bulk.update({"$inc" => {"x" => 2}})
106+ # bulk.update({"$set" => {"b" => 3}})
107+ #
108+ # Note that modifying the query selector in this way will not affect
109+ # operations that do not use a query selector, like insert().
95110 #
96111 # @param [Hash] q the query selector
97112 #
You can’t perform that action at this time.
0 commit comments