1MONGOC_CURSOR_SET_HINT(3)          libmongoc         MONGOC_CURSOR_SET_HINT(3)
2
3
4

NAME

6       mongoc_cursor_set_hint - mongoc_cursor_set_hint()
7

SYNOPSIS

9          bool
10          mongoc_cursor_set_hint (mongoc_cursor_t *cursor, uint32_t server_id);
11

PARAMETERS

13       · cursor: A mongoc_cursor_t.
14
15       · server_id: An opaque id identifying the server to use.
16

DESCRIPTION

18       Specifies  which  server to use for the operation. This function has an
19       effect only if called before the find operation is executed.
20
21       (The function name includes the old term "hint" for the sake  of  back‐
22       ward compatibility, but we now call this number a "server id".)
23
24       Use  mongoc_cursor_set_hint  only  for  building a language driver that
25       wraps the C Driver. When writing applications in C, leave the server id
26       unset  and  allow  the driver to choose a suitable server from the find
27       operation's read preference.
28

RETURNS

30       Returns true on success. If any arguments are  invalid,  returns  false
31       and logs an error.
32

AUTHOR

34       MongoDB, Inc
35
37       2017-present, MongoDB, Inc
38
39
40
41
421.16.2                           Feb 25, 2020        MONGOC_CURSOR_SET_HINT(3)
Impressum