1MONGOC_COLLECTION_DELETE(3)        libmongoc       MONGOC_COLLECTION_DELETE(3)
2
3
4

NAME

6       mongoc_collection_delete - mongoc_collection_delete()
7

SYNOPSIS

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

DEPRECATED

19       Please    use    mongoc_collection_delete_one()    or    mongoc_collec‐
20       tion_delete_many() instead.
21

PARAMETERS

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

DESCRIPTION

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

ERRORS

43       Errors are propagated via the error parameter.
44

RETURNS

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

AUTHOR

52       MongoDB, Inc
53
55       2017-present, MongoDB, Inc
56
57
58
59
601.16.2                           Feb 25, 2020      MONGOC_COLLECTION_DELETE(3)
Impressum