1MONGOC_DATABASE_HAS_COLLECTION(3)  libmongoc MONGOC_DATABASE_HAS_COLLECTION(3)
2
3
4

SYNOPSIS

6          bool
7          mongoc_database_has_collection (mongoc_database_t *database,
8                                          const char *name,
9                                          bson_error_t *error);
10
11       This  function  checks  to  see  if  a collection exists on the MongoDB
12       server within database.
13

PARAMETERS

15database: A mongoc_database_t.
16
17name: A string containing the name of the collection.
18
19error: An optional location for a bson_error_t or NULL.
20

ERRORS

22       Errors are propagated via the error parameter.
23

RETURNS

25       If the function succeeds, it returns true if the collection exists  and
26       false  if  not,  and in either case the fields of error are cleared, if
27       error is not NULL.
28
29       Returns false and sets error if there are invalid arguments or a server
30       or network error.
31

AUTHOR

33       MongoDB, Inc
34
36       2017-present, MongoDB, Inc
37
38
39
40
411.25.1                           Nov 08, 2023MONGOC_DATABASE_HAS_COLLECTION(3)
Impressum