1MONGOC_BULK_OPERATION_REPLACE_ONEM_OWNIlGTiOHbC_m_OoBPnUTgLSoK(c_3O)PERATION_REPLACE_ONE_WITH_OPTS(3)
2
3
4
6 bool
7 mongoc_bulk_operation_replace_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 Replace a single document as part of a bulk operation. This only queues
14 the operation. To execute it, call mongoc_bulk_operation_execute().
15
17 • bulk: A mongoc_bulk_operation_t.
18
19 • selector: A bson_t that selects which document to remove.
20
21 • document: A bson_t containing the replacement document.
22
23 • error: A bson_error_t any errors that may have occurred.
24
25 opts may be NULL or a BSON document with additional command options:
26
27 • validate: Construct a bitwise-or of all desired
28 bson_validate_flags_t. Set to false to skip client-side validation of
29 the provided BSON documents.
30
31 • collation: Configure textual comparisons. See Setting Collation Or‐
32 der, and the MongoDB Manual entry on Collation. Collation requires
33 MongoDB 3.2 or later, otherwise an error is returned.
34
35 • hint: A document or string that specifies the index to use to support
36 the query predicate.
37
38 • upsert: If true, insert a document if none match selector.
39
40 WARNING:
41 document may not contain fields with keys containing . or $.
42
44 Operation errors are propagated via mongoc_bulk_operation_execute(),
45 while argument validation errors are reported by the error argument.
46
48 Returns true on success, and false if passed invalid arguments.
49
50 SEE ALSO:
51 mongoc_bulk_operation_remove_many_with_opts()
52
53 mongoc_bulk_operation_insert()
54
55
57 MongoDB, Inc
58
60 2017-present, MongoDB, Inc
61
62
63
64
651.25.1 MNOoNvGO0C8_,BU2L0K2_3OPERATION_REPLACE_ONE_WITH_OPTS(3)