1MONGOC_COLLECTION_UPDATE(3)        libmongoc       MONGOC_COLLECTION_UPDATE(3)
2
3
4

SYNOPSIS

6          bool
7          mongoc_collection_update (mongoc_collection_t *collection,
8                                    mongoc_update_flags_t flags,
9                                    const bson_t *selector,
10                                    const bson_t *update,
11                                    const mongoc_write_concern_t *write_concern,
12                                    bson_error_t *error);
13

PARAMETERS

15collection: A mongoc_collection_t.
16
17flags: A bitwise or of mongoc_update_flags_t.
18
19selector: A bson_t containing the query to match documents for updat‐
20         ing.
21
22update: A bson_t containing the update to perform. If updating with a
23         pipeline, a bson_t array.
24
25write_concern: A mongoc_write_concern_t.
26
27error: An optional location for a bson_error_t or NULL.
28

DESCRIPTION

30       Superseded              by              mongoc_collection_update_one(),
31       mongoc_collection_update_many(), and mongoc_collection_replace_one().
32
33       This function shall update documents in collection that match selector.
34
35       By default, updates only a single document.  Set  flags  to  MONGOC_UP‐
36       DATE_MULTI_UPDATE to update multiple documents.
37

ERRORS

39       Errors are propagated via the error parameter.
40

RETURNS

42       Returns  true  if successful. Returns false and sets error if there are
43       invalid arguments or a server or network error.
44
45       A write concern timeout or write concern error is considered a failure.
46

AUTHOR

48       MongoDB, Inc
49
51       2017-present, MongoDB, Inc
52
53
54
55
561.25.1                           Nov 08, 2023      MONGOC_COLLECTION_UPDATE(3)
Impressum