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