1MONGOC_COLLECTION_INSERT_BULK(3) libmongoc MONGOC_COLLECTION_INSERT_BULK(3)
2
3
4
6 mongoc_collection_insert_bulk - mongoc_collection_insert_bulk()
7
8 WARNING:
9 Deprecated since version 1.9.0: This function is deprecated and
10 should not be used in new code.
11
12 Please use mongoc_collection_insert_many() in new code.
13
14
16 bool
17 mongoc_collection_insert_bulk (mongoc_collection_t *collection,
18 mongoc_insert_flags_t flags,
19 const bson_t **documents,
20 uint32_t n_documents,
21 const mongoc_write_concern_t *write_concern,
22 bson_error_t *error)
23 BSON_GNUC_DEPRECATED_FOR (mongoc_collection_insert_many);
24
26 • collection: A mongoc_collection_t.
27
28 • flags: A bitwise or of mongoc_insert_flags_t.
29
30 • documents: An array of bson_t.
31
32 • n_documents: The number of documents in documents.
33
34 • write_concern: A mongoc_write_concern_t or NULL.
35
36 • error: An optional location for a bson_error_t or NULL.
37
39 This function performs a bulk insert of all of the documents in docu‐
40 ments. This function is deprecated as it cannot accurately return which
41 documents may have failed during the bulk insert.
42
44 Errors are propagated via the error parameter.
45
46 A write concern timeout or write concern error is considered a failure.
47
49 Returns true if successful. Returns false and sets error if there are
50 invalid arguments or a server or network error.
51
53 MongoDB, Inc
54
56 2017-present, MongoDB, Inc
57
58
59
60
611.24.3 Aug 17, 2023 MONGOC_COLLECTION_INSERT_BULK(3)