1MONGOC_CLIENT_COMMAND(3)           libmongoc          MONGOC_CLIENT_COMMAND(3)
2
3
4

SYNOPSIS

6          mongoc_cursor_t *
7          mongoc_client_command (mongoc_client_t *client,
8                                 const char *db_name,
9                                 mongoc_query_flags_t flags,
10                                 uint32_t skip,
11                                 uint32_t limit,
12                                 uint32_t batch_size,
13                                 const bson_t *query,
14                                 const bson_t *fields,
15                                 const mongoc_read_prefs_t *read_prefs)
16             BSON_GNUC_WARN_UNUSED_RESULT;
17
18       This   function  is  superseded  by  mongoc_client_command_with_opts(),
19       mongoc_client_read_command_with_opts(),
20       mongoc_client_write_command_with_opts(),                            and
21       mongoc_client_read_write_command_with_opts().
22
23       This function is not considered a retryable read operation.
24

DESCRIPTION

26       This function creates a cursor which  will  execute  the  command  when
27       mongoc_cursor_next()  is  called  on  it. The client's read preference,
28       read concern, and write concern are not applied  to  the  command,  and
29       mongoc_cursor_next()  will  not  check  the server response for a write
30       concern error or write concern timeout.
31
32       If mongoc_cursor_next() returns false, then retrieve error details with
33       mongoc_cursor_error() or mongoc_cursor_error_document().
34

PARAMETERS

36client: A mongoc_client_t.
37
38db_name: The name of the database to run the command on.
39
40flags: Unused.
41
42skip: Unused.
43
44limit: Unused.
45
46batch_size: Unused.
47
48query: A bson_t containing the command specification.
49
50fields: Unused.
51
52read_prefs:  An  optional mongoc_read_prefs_t. Otherwise, the command
53         uses mode MONGOC_READ_PRIMARY.
54

RETURNS

56       A mongoc_cursor_t.
57
58       The cursor should be freed with mongoc_cursor_destroy().
59

AUTHOR

61       MongoDB, Inc
62
64       2017-present, MongoDB, Inc
65
66
67
68
691.25.1                           Nov 08, 2023         MONGOC_CLIENT_COMMAND(3)
Impressum