Skip to content

Commit c34de1e

Browse files
committed
CDRIVER-1930 docs for client and client_session bulk setters
1 parent b825d5d commit c34de1e

File tree

3 files changed

+59
-0
lines changed

3 files changed

+59
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
:man_page: mongoc_bulk_operation_set_client
2+
3+
mongoc_bulk_operation_set_client()
4+
==================================
5+
6+
Synopsis
7+
--------
8+
9+
.. code-block:: c
10+
11+
void
12+
mongoc_bulk_operation_set_client (mongoc_bulk_operation_t *bulk, void *client);
13+
14+
Parameters
15+
----------
16+
17+
* ``bulk``: A :symbol:`mongoc_bulk_operation_t`.
18+
* ``client``: A :symbol:`mongoc_client_t`.
19+
20+
Description
21+
-----------
22+
23+
Specifies a client to use for the operation. This function has an effect only if called before :symbol:`mongoc_bulk_operation_execute`.
24+
25+
If a :symbol:`mongoc_client_session_t` has already been assigned with :symbol:`mongoc_bulk_operation_set_client_session`, the ``client`` parameter must be the same as the :symbol:`mongoc_client_t` associated with that :symbol:`mongoc_client_session_t`.
26+
27+
Use ``mongoc_bulk_operation_set_client`` only for building a language driver that wraps the C Driver. When writing applications in C, a client is implicitly set by :symbol:`mongoc_collection_create_bulk_operation_with_opts`.
28+
29+
The ``client`` parameter's type is a void pointer by mistake, but it must be preserved for ABI. You must only pass a :symbol:`mongoc_client_t` pointer for ``client``.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
:man_page: mongoc_bulk_operation_set_client_session
2+
3+
mongoc_bulk_operation_set_client_session()
4+
==========================================
5+
6+
Synopsis
7+
--------
8+
9+
.. code-block:: c
10+
11+
void
12+
mongoc_bulk_operation_set_client_session (
13+
mongoc_bulk_operation_t *bulk, mongoc_client_session_t *client_session);
14+
15+
Parameters
16+
----------
17+
18+
* ``bulk``: A :symbol:`mongoc_bulk_operation_t`.
19+
* ``client_session``: A :symbol:`mongoc_client_session_t`.
20+
21+
Description
22+
-----------
23+
24+
Specifies a client session to use for the operation. This function has an effect only if called before :symbol:`mongoc_bulk_operation_execute`.
25+
26+
If a :symbol:`mongoc_client_t` has already been assigned with :symbol:`mongoc_bulk_operation_set_client`, the ``client_session`` parameter must be associated with the same :symbol:`mongoc_client_t`.
27+
28+
Use ``mongoc_bulk_operation_set_client_session`` only for building a language driver that wraps the C Driver. When writing applications in C, a client session should be specified via :symbol:`mongoc_collection_create_bulk_operation_with_opts`.

doc/mongoc_bulk_operation_t.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ See Also
4949
mongoc_bulk_operation_replace_one
5050
mongoc_bulk_operation_replace_one_with_opts
5151
mongoc_bulk_operation_set_bypass_document_validation
52+
mongoc_bulk_operation_set_client
53+
mongoc_bulk_operation_set_client_session
5254
mongoc_bulk_operation_set_hint
5355
mongoc_bulk_operation_update
5456
mongoc_bulk_operation_update_many_with_opts

0 commit comments

Comments
 (0)