1MONGOC_CLIENT_SET_WRITE_CONCERN(3) libmongocMONGOC_CLIENT_SET_WRITE_CONCERN(3)
2
3
4
6 void
7 mongoc_client_set_write_concern (mongoc_client_t *client,
8 const mongoc_write_concern_t *write_concern);
9
10 Sets the write concern for the client. This only affects future opera‐
11 tions, collections, and databases inheriting from client.
12
13 The default write concern is MONGOC_WRITE_CONCERN_W_DEFAULT: the driver
14 blocks awaiting basic acknowledgement of write operations from MongoDB.
15 This is the correct write concern for the great majority of applica‐
16 tions.
17
18 It is a programming error to call this function on a client from a
19 mongoc_client_pool_t. For pooled clients, set the write concern with
20 the MongoDB URI instead.
21
23 • client: A mongoc_client_t.
24
25 • write_concern: A mongoc_write_concern_t.
26
28 MongoDB, Inc
29
31 2017-present, MongoDB, Inc
32
33
34
35
361.25.1 Nov 08, 2023MONGOC_CLIENT_SET_WRITE_CONCERN(3)