1MONGOC_BULK_OPERATION_UPDATE_ONE_WMIOTlNHiG_bOOmCPo_TnBSgU(oL3cK)_OPERATION_UPDATE_ONE_WITH_OPTS(3)
2
3
4
6 bool
7 mongoc_bulk_operation_update_one_with_opts (mongoc_bulk_operation_t *bulk,
8 const bson_t *selector,
9 const bson_t *document,
10 const bson_t *opts,
11 bson_error_t *error); /* OUT */
12
13 This function queues an update as part of a bulk operation. It will
14 only modify a single document on the MongoDB server. This function does
15 not execute the operation. To execute the entirety of the bulk opera‐
16 tion call mongoc_bulk_operation_execute().
17
19 • bulk: A mongoc_bulk_operation_t.
20
21 • selector: A bson_t that selects which document to remove.
22
23 • document: A bson_t containing the update document.
24
25 • error: A bson_error_t any errors that may have occurred.
26
27 opts may be NULL or a BSON document with additional command options:
28
29 • validate: Construct a bitwise-or of all desired
30 bson_validate_flags_t. Set to false to skip client-side validation of
31 the provided BSON documents.
32
33 • collation: Configure textual comparisons. See Setting Collation Or‐
34 der, and the MongoDB Manual entry on Collation. Collation requires
35 MongoDB 3.2 or later, otherwise an error is returned.
36
37 • hint: A document or string that specifies the index to use to support
38 the query predicate.
39
40 • upsert: If true, insert a document if none match selector.
41
42 • arrayFilters: An array of filters specifying to which array elements
43 an update should apply.
44
45 WARNING:
46 document must only contain fields whose key starts with $. See the
47 update document specification for more details.
48
50 Operation errors are propagated via mongoc_bulk_operation_execute(),
51 while argument validation errors are reported by the error argument.
52
54 Returns true on success, and false if there is a server or network er‐
55 ror or if passed invalid arguments.
56
57 SEE ALSO:
58 mongoc_bulk_operation_update_many_with_opts()
59
60
62 MongoDB, Inc
63
65 2017-present, MongoDB, Inc
66
67
68
69
701.25.1 NMoOvNG0O8C,_B2U0L2K3_OPERATION_UPDATE_ONE_WITH_OPTS(3)