1MONGOC_CLIENT_SET_READ_PREFS(3) libmongoc MONGOC_CLIENT_SET_READ_PREFS(3)
2
3
4
6 mongoc_client_set_read_prefs - mongoc_client_set_read_prefs()
7
9 void
10 mongoc_client_set_read_prefs (mongoc_client_t *client,
11 const mongoc_read_prefs_t *read_prefs);
12
13 Sets the default read preferences to use with future operations upon
14 client.
15
16 The global default is to read from the replica set primary.
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 read preferences with
20 the MongoDB URI instead.
21
22 Please see the MongoDB website for a description of Read Preferences.
23
25 • client: A mongoc_client_t.
26
27 • read_prefs: A mongoc_read_prefs_t.
28
30 MongoDB, Inc
31
33 2017-present, MongoDB, Inc
34
35
36
37
381.23.1 Oct 20, 2022 MONGOC_CLIENT_SET_READ_PREFS(3)