1MONGOC_CLIENT_COMMAND(3) libmongoc 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
24 This function is not considered a retryable read operation.
25
27 This function creates a cursor which will execute the command when mon‐
28 goc_cursor_next is called on it. The client's read preference, read
29 concern, and write concern are not applied to the command, and mon‐
30 goc_cursor_next will not check the server response for a write concern
31 error or write concern timeout.
32
33 If mongoc_cursor_next() returns false, then retrieve error details with
34 mongoc_cursor_error() or mongoc_cursor_error_document().
35
37 · client: A mongoc_client_t.
38
39 · db_name: The name of the database to run the command on.
40
41 · flags: Unused.
42
43 · skip: Unused.
44
45 · limit: Unused.
46
47 · batch_size: Unused.
48
49 · query: A bson_t containing the command specification.
50
51 · fields: Unused.
52
53 · read_prefs: An optional mongoc_read_prefs_t. Otherwise, the command
54 uses mode MONGOC_READ_PRIMARY.
55
57 A mongoc_cursor_t.
58
59 The cursor should be freed with mongoc_cursor_destroy().
60
62 MongoDB, Inc
63
65 2017-present, MongoDB, Inc
66
67
68
69
701.16.2 Feb 25, 2020 MONGOC_CLIENT_COMMAND(3)