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

WARNING:

6          Deprecated  since  version  1.9.0:  This  function is deprecated and
7          should not be used in new code.
8
9          Please         use         mongoc_collection_delete_one()         or
10          mongoc_collection_delete_many() in new code.
11
12

SYNOPSIS

14          bool
15          mongoc_collection_delete (mongoc_collection_t *collection,
16                                    mongoc_delete_flags_t flags,
17                                    const bson_t *selector,
18                                    const mongoc_write_concern_t *write_concern,
19                                    bson_error_t *error)
20             BSON_GNUC_DEPRECATED_FOR (mongoc_collection_delete_one or
21                                       mongoc_collection_delete_many);
22

PARAMETERS

24collection: A mongoc_collection_t.
25
26flags: A mongoc_delete_flags_t.
27
28selector: A bson_t containing the query to match documents.
29
30write_concern: A mongoc_write_concern_t or NULL.
31
32error: An optional location for a bson_error_t or NULL.
33

DESCRIPTION

35       This function shall delete documents in the given collection that match
36       selector. The bson selector is not validated, simply  passed  along  as
37       appropriate to the server.  As such, compatibility and errors should be
38       validated in the appropriate server documentation.
39
40       If you want to  limit  deletes  to  a  single  document,  provide  MON‐
41       GOC_DELETE_SINGLE_REMOVE in flags.
42

ERRORS

44       Errors are propagated via the error parameter.
45

RETURNS

47       Returns  true  if successful. Returns false and sets error if there are
48       invalid arguments or a server or network error.
49
50       A write concern timeout or write concern error is considered a failure.
51

AUTHOR

53       MongoDB, Inc
54
56       2017-present, MongoDB, Inc
57
58
59
60
611.25.1                           Nov 08, 2023      MONGOC_COLLECTION_DELETE(3)
Impressum