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

SYNOPSIS

9          mongoc_cursor_t *
10          mongoc_collection_find_indexes (mongoc_collection_t *collection,
11                                          bson_error_t *error);
12             BSON_GNUC_WARN_UNUSED_RESULT
13             BSON_GNUC_DEPRECATED_FOR (mongoc_collection_find_indexes_with_opts);
14

DEPRECATED

16       This function is deprecated and should not be used in new code.
17
18       Please use mongoc_collection_find_indexes_with_opts() instead.
19
20       Fetches  a  cursor containing documents, each corresponding to an index
21       on this collection.
22
23       This function is considered a retryable read operation.  Upon  a  tran‐
24       sient error (a network error, errors due to replica set failover, etc.)
25       the operation is safely retried once.  If retryreads is  false  in  the
26       URI (see mongoc_uri_t) the retry behavior does not apply.
27

PARAMETERS

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

ERRORS

34       Errors are propagated via the error parameter.
35

RETURNS

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

AUTHOR

61       MongoDB, Inc
62
64       2017-present, MongoDB, Inc
65
66
67
68
691.23.1                           Oct 20, 2022MONGOC_COLLECTION_FIND_INDEXES(3)
Impressum