1MONGOC_COLLECTION_UPDATE(3)    MongoDB C Driver    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

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

DESCRIPTION

33       Superseded      by     mongoc_collection_update_one,     mongoc_collec‐
34       tion_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  MON‐
39       GOC_UPDATE_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.15.2                           Nov 06, 2019      MONGOC_COLLECTION_UPDATE(3)
Impressum