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