1MONGOC_BULK_OPERATION_EXECUTE(3) libmongoc MONGOC_BULK_OPERATION_EXECUTE(3)
2
3
4
6 mongoc_bulk_operation_execute - mongoc_bulk_operation_execute()
7
9 uint32_t
10 mongoc_bulk_operation_execute (mongoc_bulk_operation_t *bulk,
11 bson_t *reply,
12 bson_error_t *error);
13
14 This function executes all operations queued into the bulk operation.
15 Unless ordered: false was specified in the opts passed to mongoc_col‐
16 lection_create_bulk_operation_with_opts(), then forward progress will
17 be stopped upon the first error.
18
19 It is only valid to call mongoc_bulk_operation_execute() once. The mon‐
20 goc_bulk_operation_t must be destroyed afterwards.
21
22 WARNING:
23 reply is always initialized, even upon failure. Callers must call
24 bson_destroy() to release this potential allocation.
25
27 • bulk: A mongoc_bulk_operation_t.
28
29 • reply: An uninitialized bson_t.
30
31 • error: An optional location for a bson_error_t or NULL.
32
34 Errors are propagated via the error parameter.
35
37 On success, returns the server id used. On failure, returns 0 and sets
38 error.
39
40 A write concern timeout or write concern error is considered a failure.
41
42 The reply document counts operations and collects error information.
43 See Bulk Write Operations for examples.
44
45 SEE ALSO:
46 Bulk Write Operations
47
48 mongoc_bulk_operation_get_hint, which gets the id of the server used even if the operation failed.
49
50
52 MongoDB, Inc
53
55 2017-present, MongoDB, Inc
56
57
58
59
601.20.0 Nov 18, 2021 MONGOC_BULK_OPERATION_EXECUTE(3)