1MONGOC_COLLECTION_FIND_INDEXES_WITH_lMOiOPbNTmGSoO(nC3g_)oCcOLLECTION_FIND_INDEXES_WITH_OPTS(3)
2
3
4

SYNOPSIS

6          mongoc_cursor_t *
7          mongoc_collection_find_indexes_with_opts (mongoc_collection_t *collection,
8                                                    const bson_t *opts)
9             BSON_GNUC_WARN_UNUSED_RESULT;
10
11       Fetches  a  cursor containing documents, each corresponding to an index
12       on this collection.
13
14       This function is considered a retryable read operation.  Upon  a  tran‐
15       sient error (a network error, errors due to replica set failover, etc.)
16       the operation is safely retried once.  If retryreads is  false  in  the
17       URI (see mongoc_uri_t) the retry behavior does not apply.
18

PARAMETERS

20collection: A mongoc_collection_t.
21
22opts: A bson_t containing additional options.
23
24       opts may be NULL or a BSON document with additional command options:
25
26sessionId:    First,   construct   a   mongoc_client_session_t   with
27         mongoc_client_start_session().  You  can  begin  a  transaction  with
28         mongoc_client_session_start_transaction(),    optionally    with    a
29         mongoc_transaction_opt_t that overrides the  options  inherited  from
30         collection, and use mongoc_client_session_append() to add the session
31         to opts. See the example code for mongoc_client_session_t.
32
33serverId: To target a specific server, include  an  int32  "serverId"
34         field.  Obtain  the id by calling mongoc_client_select_server(), then
35         mongoc_server_description_id() on its return value.
36
37       For a list of all options, see the MongoDB Manual entry on the  listIn‐
38       dexes command.
39

ERRORS

41       Use mongoc_cursor_error() on the returned cursor to check for errors.
42

RETURNS

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

AUTHOR

72       MongoDB, Inc
73
75       2017-present, MongoDB, Inc
76
77
78
79
801.25.1                           NovMO0N8G,OC2_0C2O3LLECTION_FIND_INDEXES_WITH_OPTS(3)
Impressum