1MONGOC_CLIENT_COMMAND(3) MongoDB C Driver MONGOC_CLIENT_COMMAND(3)
2
3
4
6 mongoc_client_command - mongoc_client_command()
7
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
20 This function is superseded by mongoc_client_command_with_opts(), mon‐
21 goc_client_read_command_with_opts(), mongoc_client_write_com‐
22 mand_with_opts(), and mongoc_client_read_write_command_with_opts().
23
25 This function creates a cursor which will execute the command when mon‐
26 goc_cursor_next is called on it. The client's read preference, read
27 concern, and write concern are not applied to the command, and mon‐
28 goc_cursor_next will not check the server response for a write concern
29 error or write concern timeout.
30
31 If mongoc_cursor_next() returns false, then retrieve error details with
32 mongoc_cursor_error() or mongoc_cursor_error_document().
33
35 · client: A mongoc_client_t.
36
37 · db_name: The name of the database to run the command on.
38
39 · flags: Unused.
40
41 · skip: Unused.
42
43 · limit: Unused.
44
45 · batch_size: Unused.
46
47 · query: A bson_t containing the command specification.
48
49 · fields: Unused.
50
51 · read_prefs: An optional mongoc_read_prefs_t. Otherwise, the command
52 uses mode MONGOC_READ_PRIMARY.
53
55 A mongoc_cursor_t.
56
57 The cursor should be freed with mongoc_cursor_destroy().
58
60 MongoDB, Inc
61
63 2017-present, MongoDB, Inc
64
65
66
67
681.14.0 Feb 22, 2019 MONGOC_CLIENT_COMMAND(3)