1MONGOC_COLLECTION_DELETE(3) MongoDB C Driver MONGOC_COLLECTION_DELETE(3)
2
3
4
6 mongoc_collection_delete - mongoc_collection_delete()
7
9 bool
10 mongoc_collection_delete (mongoc_collection_t *collection,
11 mongoc_delete_flags_t flags,
12 const bson_t *selector,
13 const mongoc_write_concern_t *write_concern,
14 bson_error_t *error)
15 BSON_GNUC_DEPRECATED_FOR (mongoc_collection_delete_one or
16 mongoc_collection_delete_many);
17
19 Please use mongoc_collection_delete_one() or mongoc_collec‐
20 tion_delete_many() instead.
21
23 · collection: A mongoc_collection_t.
24
25 · flags: A mongoc_delete_flags_t.
26
27 · selector: A bson_t containing the query to match documents.
28
29 · write_concern: A mongoc_write_concern_t or NULL.
30
31 · error: An optional location for a bson_error_t or NULL.
32
34 This function shall delete documents in the given collection that match
35 selector. The bson selector is not validated, simply passed along as
36 appropriate to the server. As such, compatibility and errors should be
37 validated in the appropriate server documentation.
38
39 If you want to limit deletes to a single document, provide MON‐
40 GOC_DELETE_SINGLE_REMOVE in flags.
41
43 Errors are propagated via the error parameter.
44
46 Returns true if successful. Returns false and sets error if there are
47 invalid arguments or a server or network error.
48
49 A write concern timeout or write concern error is considered a failure.
50
52 MongoDB, Inc
53
55 2017-present, MongoDB, Inc
56
57
58
59
601.14.0 Feb 22, 2019 MONGOC_COLLECTION_DELETE(3)