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.
26
27       · write_concern: A mongoc_write_concern_t.
28
29       · error: An optional location for a bson_error_t or NULL.
30

DESCRIPTION

32       Superseded     by     mongoc_collection_update_one,      mongoc_collec‐
33       tion_update_many, and mongoc_collection_replace_one.
34
35       This function shall update documents in collection that match selector.
36
37       By  default,  updates  only  a  single  document.  Set  flags  to  MON‐
38       GOC_UPDATE_MULTI_UPDATE to update multiple documents.
39

ERRORS

41       Errors are propagated via the error parameter.
42

RETURNS

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

AUTHOR

50       MongoDB, Inc
51
53       2017-present, MongoDB, Inc
54
55
56
57
581.14.0                           Feb 22, 2019      MONGOC_COLLECTION_UPDATE(3)
Impressum