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

NAME

6       mongoc_collection_update - mongoc_collection_update()
7

SYNOPSIS

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

PARAMETERS

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

DESCRIPTION

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

ERRORS

42       Errors are propagated via the error parameter.
43

RETURNS

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

AUTHOR

51       MongoDB, Inc
52
54       2017-present, MongoDB, Inc
55
56
57
58
591.23.1                           Oct 20, 2022      MONGOC_COLLECTION_UPDATE(3)
Impressum