Skip to content

Commit c0b5ff4

Browse files
author
Christian Hergert
committed
doc: add docs for mongoc_collection_create_bulk_operation().
1 parent 5c07bd3 commit c0b5ff4

File tree

1 file changed

+74
-0
lines changed

1 file changed

+74
-0
lines changed
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
mongoc_collection_create_bulk_operation(3)
2+
==========================================
3+
4+
5+
NAME
6+
----
7+
mongoc_collection_create_bulk_operation - begin a new bulk operation
8+
9+
10+
SYNOPSIS
11+
--------
12+
[source,c]
13+
-----------------------
14+
mongoc_bulk_operation_t *
15+
mongoc_collection_create_bulk_operation
16+
(mongoc_collection_t *collection,
17+
bool ordered,
18+
const mongoc_write_concern_t *write_concern);
19+
-----------------------
20+
21+
22+
DESCRIPTION
23+
-----------
24+
The _mongoc_collection_create_bulk_operation()_ function shall begin a new
25+
bulk operation. After creating this you may call various functions such as
26+
_mongoc_bulk_operation_update()_, _mongoc_bulk_operation_insert()_ and others.
27+
After calling _mongoc_bulk_operation_execute()_, the commands will be executed
28+
in as large as batches as reasonable by the client.
29+
30+
If _ordered_ is true, then processing will stop at the first error.
31+
If _ordered_ is not true, then the bulk operation will attempt to continue
32+
processing even after the first failure.
33+
34+
_write_concern_ should contain the write concern you wish to have applied
35+
to all operations within the bulk operation.
36+
37+
38+
NOTES
39+
-----
40+
In the future, operations may be opportunistically sent to the server as they
41+
are added to the bulk operation, but this has not yet been implemented.
42+
43+
44+
RETURN VALUE
45+
------------
46+
A newly allocated _mongoc_bulk_operation_t_ that should be destroyed with
47+
_mongoc_bulk_operation_destroy()_.
48+
49+
50+
ERRORS
51+
------
52+
get_database and create_bulk_operation are both lazy, and as such do not return any
53+
errors. get_gridfs ensures relevant indexes, and as such returns errors as
54+
linkmongoc:mongoc_collection_ensure_index[3].
55+
56+
57+
SEE ALSO
58+
--------
59+
linkmongoc:mongoc_collection[7]
60+
linkmongoc:mongoc_bulk_operation[7]
61+
linkmongoc:mongoc_bulk_operation_execute[3]
62+
linkmongoc:mongoc_bulk_operation_insert[3]
63+
linkmongoc:mongoc_bulk_operation_delete[3]
64+
linkmongoc:mongoc_bulk_operation_delete_one[3]
65+
linkmongoc:mongoc_bulk_operation_replace_one[3]
66+
linkmongoc:mongoc_bulk_operation_update[3]
67+
linkmongoc:mongoc_bulk_operation_update_one[3]
68+
linkmongoc:mongoc_bulk_operation_destroy[3]
69+
70+
71+
AUTHORS
72+
-------
73+
74+
This page was written by MongoDB, Inc.

0 commit comments

Comments
 (0)