1MONGOC_COLLECTION_REMOVE(3) MongoDB C Driver MONGOC_COLLECTION_REMOVE(3)
2
3
4
6 mongoc_collection_remove - mongoc_collection_remove()
7
9 bool
10 mongoc_collection_remove (mongoc_collection_t *collection,
11 mongoc_remove_flags_t flags,
12 const bson_t *selector,
13 const mongoc_write_concern_t *write_concern,
14 bson_error_t *error);
15
17 · collection: A mongoc_collection_t.
18
19 · flags: A mongoc_remove_flags_t.
20
21 · selector: A bson_t containing the query to match documents.
22
23 · write_concern: A mongoc_write_concern_t or NULL.
24
25 · error: An optional location for a bson_error_t or NULL.
26
28 Superseded by mongoc_collection_delete_one and mongoc_collec‐
29 tion_delete_many.
30
31 This function shall remove documents in the given collection that match
32 selector. The bson selector is not validated, simply passed along as
33 appropriate to the server. As such, compatibility and errors should be
34 validated in the appropriate server documentation.
35
36 If you want to limit deletes to a single document, provide MON‐
37 GOC_REMOVE_SINGLE_REMOVE in flags.
38
40 Errors are propagated via the error parameter.
41
43 Returns true if successful. Returns false and sets error if there are
44 invalid arguments or a server or network error.
45
47 MongoDB, Inc
48
50 2017-present, MongoDB, Inc
51
52
53
54
551.13.1 Jan 24, 2019 MONGOC_COLLECTION_REMOVE(3)