1MONGOC_READ_CONCERN_T(3) libmongoc MONGOC_READ_CONCERN_T(3)
2
3
4
5Read Concern abstraction
6
8 New in MongoDB 3.2.
9
10 The mongoc_read_concern_t allows clients to choose a level of isolation
11 for their reads. The default, MONGOC_READ_CONCERN_LEVEL_LOCAL, is right
12 for the great majority of applications.
13
14 You can specify a read concern on connection objects, database objects,
15 or collection objects.
16
17 See readConcern on the MongoDB website for more information.
18
19 Read Concern is only sent to MongoDB when it has explicitly been set by
20 mongoc_read_concern_set_level() to anything other than NULL.
21
23 ┌────────────────────┬─────────────────────┬─────────────────────┐
24 │Macro │ Description │ First MongoDB ver‐ │
25 │ │ │ sion │
26 ├────────────────────┼─────────────────────┼─────────────────────┤
27 │MONGOC_READ_CON‐ │ Level "local", the │ 3.2 │
28 │CERN_LEVEL_LOCAL │ default. │ │
29 ├────────────────────┼─────────────────────┼─────────────────────┤
30 │MONGOC_READ_CON‐ │ Level "majority". │ 3.2 │
31 │CERN_LEVEL_MAJORITY │ │ │
32 ├────────────────────┼─────────────────────┼─────────────────────┤
33 │MONGOC_READ_CON‐ │ Level "lineariz‐ │ 3.4 │
34 │CERN_LEVEL_LIN‐ │ able". │ │
35 │EARIZABLE │ │ │
36 ├────────────────────┼─────────────────────┼─────────────────────┤
37 │MONGOC_READ_CON‐ │ Level "available". │ 3.6 │
38 │CERN_LEVEL_AVAIL‐ │ │ │
39 │ABLE │ │ │
40 ├────────────────────┼─────────────────────┼─────────────────────┤
41 │MONGOC_READ_CON‐ │ Level "snapshot". │ 4.0 │
42 │CERN_LEVEL_SNAPSHOT │ │ │
43 └────────────────────┴─────────────────────┴─────────────────────┘
44
45 For the sake of compatibility with future versions of MongoDB,
46 mongoc_read_concern_set_level() allows any string, not just this list
47 of known read concern levels.
48
49 See Read Concern Levels in the MongoDB manual for more information
50 about the individual read concern levels.
51
53 MongoDB, Inc
54
56 2017-present, MongoDB, Inc
57
58
59
60
611.25.1 Nov 08, 2023 MONGOC_READ_CONCERN_T(3)