1MONGOC_DATABASE_FIND_COLLECTIONS(3)libmongocMONGOC_DATABASE_FIND_COLLECTIONS(3)
2
3
4

NAME

6       mongoc_database_find_collections - mongoc_database_find_collections()
7

SYNOPSIS

9          mongoc_cursor_t *
10          mongoc_database_find_collections (mongoc_database_t *database,
11                                            const bson_t *filter,
12                                            bson_error_t *error)
13             BSON_GNUC_WARN_UNUSED_RESULT
14             BSON_GNUC_DEPRECATED_FOR (mongoc_database_find_collections_with_opts);
15

DEPRECATED

17       This function is deprecated and should not be used in new code.
18
19       Please use mongoc_database_find_collections_with_opts() instead.
20

DESCRIPTION

22       Fetches  a cursor containing documents, each corresponding to a collec‐
23       tion on this database.
24
25       This function is considered a retryable read operation.  Upon  a  tran‐
26       sient error (a network error, errors due to replica set failover, etc.)
27       the operation is safely retried once.  If retryreads is  false  in  the
28       URI (see mongoc_uri_t) the retry behavior does not apply.
29

PARAMETERS

31database: A mongoc_database_t.
32
33filter:  A  matcher used by the server to filter the returned collec‐
34         tions. May be NULL.
35
36error: An optional location for a bson_error_t or NULL.
37

ERRORS

39       Errors are propagated via the error parameter.
40

RETURNS

42       This function returns a newly allocated mongoc_cursor_t that should  be
43       freed  with  mongoc_cursor_destroy()  when no longer in use, or NULL in
44       case of error. The user must call mongoc_cursor_next() on the  returned
45       mongoc_cursor_t to execute the initial command.
46
47       In  the  returned cursor each result corresponds to the server's repre‐
48       sentation of a collection in this database.
49
50       The    cursor    functions     mongoc_cursor_set_limit,     mongoc_cur‐
51       sor_set_batch_size, and mongoc_cursor_set_max_await_time_ms have no use
52       on the returned cursor.
53

AUTHOR

55       MongoDB, Inc
56
58       2017-present, MongoDB, Inc
59
60
61
62
631.20.0                           Nov 18, 202M1ONGOC_DATABASE_FIND_COLLECTIONS(3)
Impressum