mongoc_collection_find_and_modify_with_opts man page

mongoc_collection_find_and_modify_with_opts ā€” mongoc_collection_find_and_modify_with_opts()

Synopsis

bool
mongoc_collection_find_and_modify_with_opts (
   mongoc_collection_t *collection,
   const bson_t *query,
   const mongoc_find_and_modify_opts_t *opts,
   bson_t *reply,
   bson_error_t *error);

Parameters

Description

Update and return an object.

reply is always initialized, and must be freed with bson_destroy().

Errors

Errors are propagated via the error parameter.

Returns

Returns true if successful. Returns false and sets error if there are invalid arguments or a server or network error.

A write concern timeout or write concern error is considered a failure.

Example

See the example code for mongoc_find_and_modify_opts_t.

Author

MongoDB, Inc

Info

Sep 17, 2018 1.13.0 MongoDB C Driver