1MONGOC_CLIENT_SET_READ_PREFS(3) libmongoc MONGOC_CLIENT_SET_READ_PREFS(3)
2
3
4
6 void
7 mongoc_client_set_read_prefs (mongoc_client_t *client,
8 const mongoc_read_prefs_t *read_prefs);
9
10 Sets the default read preferences to use with future operations upon
11 client.
12
13 The global default is to read from the replica set primary.
14
15 It is a programming error to call this function on a client from a
16 mongoc_client_pool_t. For pooled clients, set the read preferences with
17 the MongoDB URI instead.
18
19 Please see the MongoDB website for a description of Read Preferences.
20
22 • client: A mongoc_client_t.
23
24 • read_prefs: A mongoc_read_prefs_t.
25
27 MongoDB, Inc
28
30 2017-present, MongoDB, Inc
31
32
33
34
351.25.1 Nov 08, 2023 MONGOC_CLIENT_SET_READ_PREFS(3)