SYNOPSIS

bool
mongoc_collection_update (mongoc_collection_t          *collection,
                          mongoc_update_flags_t         flags,
                          const bson_t                 *selector,
                          const bson_t                 *update,
                          const mongoc_write_concern_t *write_concern,
                          bson_error_t                 *error);

DESCRIPTION

The mongoc_collection_update() function shall update documents in a collection that match selector.

By default, updates only update one document. Set MONGOC_UPDATE_MULTI_UPDATE to change all matching documents.

FLAGS

MONGOC_UPDATE_NONE

No update flags specified.

MONGOC_UPDATE_UPSERT

Perform an upsert.

MONGOC_UPDATE_MULTI_UPDATE

Continue updating after first match.

RETURN VALUE

The mongoc_collection_update() function returns a true if successful.

ERRORS

errors are returned through error

SEE ALSO

AUTHORS

This page was written by MongoDB Inc.