1MONGOC_COLLECTION_SET_READ_PREFS(3)libmongocMONGOC_COLLECTION_SET_READ_PREFS(3)
2
3
4
6 void
7 mongoc_collection_set_read_prefs (mongoc_collection_t *collection,
8 const mongoc_read_prefs_t *read_prefs);
9
11 • collection: A mongoc_collection_t.
12
13 • read_prefs: A mongoc_read_prefs_t.
14
16 Sets the default read preferences to use for operations on collection
17 not specifying a read preference.
18
19 The global default is MONGOC_READ_PRIMARY: if the client is connected
20 to a replica set it reads from the primary, otherwise it reads from the
21 current MongoDB server.
22
23 Please see the MongoDB website for a description of Read Preferences.
24
26 MongoDB, Inc
27
29 2017-present, MongoDB, Inc
30
31
32
33
341.25.1 Nov 08, 202M3ONGOC_COLLECTION_SET_READ_PREFS(3)