1MONGOC_READ_MODE_T(3) libmongoc MONGOC_READ_MODE_T(3)
2
3
4
6 mongoc_read_mode_t - mongoc_read_mode_t
7
8 Read Preference Modes
9
11 typedef enum {
12 MONGOC_READ_PRIMARY = (1 << 0),
13 MONGOC_READ_SECONDARY = (1 << 1),
14 MONGOC_READ_PRIMARY_PREFERRED = (1 << 2) | MONGOC_READ_PRIMARY,
15 MONGOC_READ_SECONDARY_PREFERRED = (1 << 2) | MONGOC_READ_SECONDARY,
16 MONGOC_READ_NEAREST = (1 << 3) | MONGOC_READ_SECONDARY,
17 } mongoc_read_mode_t;
18
20 This enum describes how reads should be dispatched. The default is MON‐
21 GOC_READ_PRIMARY.
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.21.1 Mar 02, 2022 MONGOC_READ_MODE_T(3)