1MONGOC_UPDATE_FLAGS_T(3) libmongoc MONGOC_UPDATE_FLAGS_T(3)
2
3
4
6 mongoc_update_flags_t - mongoc_update_flags_t
7
8 Flags for update operations
9
11 typedef enum {
12 MONGOC_UPDATE_NONE = 0,
13 MONGOC_UPDATE_UPSERT = 1 << 0,
14 MONGOC_UPDATE_MULTI_UPDATE = 1 << 1,
15 } mongoc_update_flags_t;
16
17 #define MONGOC_UPDATE_NO_VALIDATE (1U << 31)
18
20 These flags correspond to the MongoDB wire protocol. They may be bit‐
21 wise or'd together. The allow for modifying the way an update is per‐
22 formed in the MongoDB server.
23
25 ┌───────────────────────────┬────────────────────────────┐
26 │MONGOC_UPDATE_NONE │ No update flags set. │
27 ├───────────────────────────┼────────────────────────────┤
28 │MONGOC_UPDATE_UPSERT │ If an upsert should be │
29 │ │ performed. │
30 ├───────────────────────────┼────────────────────────────┤
31 │MONGOC_UPDATE_MULTI_UPDATE │ If more than a single │
32 │ │ matching document should │
33 │ │ be updated. By default │
34 │ │ only the first document is │
35 │ │ updated. │
36 ├───────────────────────────┼────────────────────────────┤
37 │MONGOC_UPDATE_NO_VALIDATE │ Do not perform client side │
38 │ │ BSON validations when per‐ │
39 │ │ forming an update. This is │
40 │ │ useful if you already know │
41 │ │ your BSON documents are │
42 │ │ valid. │
43 └───────────────────────────┴────────────────────────────┘
44
46 MongoDB, Inc
47
49 2017-present, MongoDB, Inc
50
51
52
53
541.17.6 Jun 03, 2021 MONGOC_UPDATE_FLAGS_T(3)