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

NAME

6       mongoc_client_command - mongoc_client_command()
7

SYNOPSIS

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

DESCRIPTION

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

PARAMETERS

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

RETURNS

58       A mongoc_cursor_t.
59
60       The cursor should be freed with mongoc_cursor_destroy().
61

AUTHOR

63       MongoDB, Inc
64
66       2017-present, MongoDB, Inc
67
68
69
70
711.20.0                           Nov 18, 2021         MONGOC_CLIENT_COMMAND(3)
Impressum