1MONGOC_COLLECTION_CREATE_BUMLOKN_GOOPCE_RCAOTlLIiLObENmC_oTWnIIgOToNHc__CORPETAST(E3_)BULK_OPERATION_WITH_OPTS(3)
2
3
4
6 mongoc_collection_create_bulk_operation_with_opts - mongoc_collec‐
7 tion_create_bulk_operation_with_opts()
8
10 mongoc_bulk_operation_t *
11 mongoc_collection_create_bulk_operation_with_opts (
12 mongoc_collection_t *collection,
13 const bson_t *opts) BSON_GNUC_WARN_UNUSED_RESULT;
14
16 • collection: A mongoc_collection_t.
17
18 opts may be NULL or a BSON document with additional command options:
19
20 • writeConcern: Construct a mongoc_write_concern_t and use
21 mongoc_write_concern_append() to add the write concern to opts. See
22 the example code for mongoc_client_write_command_with_opts().
23
24 • ordered: set to false to attempt to insert all documents, continuing
25 after errors.
26
27 • sessionId: First, construct a mongoc_client_session_t with
28 mongoc_client_start_session(). You can begin a transaction with
29 mongoc_client_session_start_transaction(), optionally with a
30 mongoc_transaction_opt_t that overrides the options inherited from
31 collection, and use mongoc_client_session_append() to add the session
32 to opts. See the example code for mongoc_client_session_t.
33
34 • let: A BSON document consisting of any number of parameter names,
35 each followed by definitions of constants in the MQL Aggregate Ex‐
36 pression language.
37
38 • comment: A bson_value_t specifying the comment to attach to this com‐
39 mand. The comment will appear in log messages, profiler output, and
40 currentOp output. Requires MongoDB 4.4 or later.
41
43 This function shall begin a new bulk operation. After creating this you
44 may call various functions such as mongoc_bulk_operation_update(),
45 mongoc_bulk_operation_insert() and others.
46
47 After calling mongoc_bulk_operation_execute() the commands will be exe‐
48 cuted in as large as batches as reasonable by the client.
49
51 Errors are propagated when executing the bulk operation.
52
54 A newly allocated mongoc_bulk_operation_t that should be freed with
55 mongoc_bulk_operation_destroy() when no longer in use.
56
57 WARNING:
58 Failure to handle the result of this function is a programming er‐
59 ror.
60
61 SEE ALSO:
62 Bulk Write Operations
63
64 mongoc_bulk_operation_t
65
66
68 MongoDB, Inc
69
71 2017-present, MongoDB, Inc
72
73
74
75
761.24.3 MONGOC_ACuOgLL1E7C,TI2O0N2_3CREATE_BULK_OPERATION_WITH_OPTS(3)