1MONGOC_COLLECTION_FIND_INDEXES(3)  libmongoc MONGOC_COLLECTION_FIND_INDEXES(3)
2
3
4

NAME

6       mongoc_collection_find_indexes - mongoc_collection_find_indexes()
7
8       WARNING:
9          Deprecated  since  version  1.9.0:  This  function is deprecated and
10          should not be used in new code.
11
12          Please use mongoc_collection_find_indexes_with_opts() in new code.
13
14

SYNOPSIS

16          mongoc_cursor_t *
17          mongoc_collection_find_indexes (mongoc_collection_t *collection,
18                                          bson_error_t *error);
19             BSON_GNUC_WARN_UNUSED_RESULT
20             BSON_GNUC_DEPRECATED_FOR (mongoc_collection_find_indexes_with_opts);
21
22       Fetches a cursor containing documents, each corresponding to  an  index
23       on this collection.
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

31collection: A mongoc_collection_t.
32
33error: An optional location for a bson_error_t or NULL.
34

ERRORS

36       Errors are propagated via the error parameter.
37

RETURNS

39       This function returns a newly allocated mongoc_cursor_t that should  be
40       freed  with mongoc_cursor_destroy() when no longer in use. The returned
41       mongoc_cursor_t is never NULL,  even  on  error.  The  user  must  call
42       mongoc_cursor_next()  on  the  returned  mongoc_cursor_t to execute the
43       initial command.
44
45       Cursor errors can be checked  with  mongoc_cursor_error_document().  It
46       always  fills out the bson_error_t if an error occurred, and optionally
47       includes a server reply document if the error occurred server-side.
48
49       WARNING:
50          Failure to handle the result of this function is a  programming  er‐
51          ror.
52
53       In  the  returned cursor each result corresponds to the server's repre‐
54       sentation of an index on this collection. If the  collection  does  not
55       exist on the server, the cursor will be empty.
56
57       The         cursor         functions         mongoc_cursor_set_limit(),
58       mongoc_cursor_set_batch_size(),                                     and
59       mongoc_cursor_set_max_await_time_ms()  have no use on the returned cur‐
60       sor.
61

AUTHOR

63       MongoDB, Inc
64
66       2017-present, MongoDB, Inc
67
68
69
70
711.24.3                           Aug 17, 2023MONGOC_COLLECTION_FIND_INDEXES(3)
Impressum