1MONGOC_DATABASE_SET_READ_PREFS(3)  libmongoc MONGOC_DATABASE_SET_READ_PREFS(3)
2
3
4

NAME

6       mongoc_database_set_read_prefs - mongoc_database_set_read_prefs()
7

SYNOPSIS

9          void
10          mongoc_database_set_read_prefs (mongoc_database_t *database,
11                                          const mongoc_read_prefs_t *read_prefs);
12
13       This  function  sets  the default read preferences to use on operations
14       performed     with     database.     Collections      created      with
15       mongoc_database_get_collection()  after  this  call  will inherit these
16       read preferences.
17
18       The global default is MONGOC_READ_PRIMARY: if the client  is  connected
19       to a replica set it reads from the primary, otherwise it reads from the
20       current MongoDB server.
21
22       Please see the MongoDB website for a description of Read Preferences.
23

PARAMETERS

25database: A mongoc_database_t.
26
27read_prefs: A mongoc_read_prefs_t.
28

AUTHOR

30       MongoDB, Inc
31
33       2017-present, MongoDB, Inc
34
35
36
37
381.23.1                           Oct 20, 2022MONGOC_DATABASE_SET_READ_PREFS(3)
Impressum