1MONGOC_DATABASE_COMMAND(3) MongoDB C Driver MONGOC_DATABASE_COMMAND(3)
2
3
4
6 mongoc_database_command - mongoc_database_command()
7
9 mongoc_cursor_t *
10 mongoc_database_command (mongoc_database_t *database,
11 mongoc_query_flags_t flags,
12 uint32_t skip,
13 uint32_t limit,
14 uint32_t batch_size,
15 const bson_t *command,
16 const bson_t *fields,
17 const mongoc_read_prefs_t *read_prefs);
18
19 This function is superseded by mongoc_database_command_with_opts(),
20 mongoc_database_read_command_with_opts(), mongoc_database_write_com‐
21 mand_with_opts(), and mongoc_database_read_write_command_with_opts().
22
24 This function creates a cursor which will execute the command when mon‐
25 goc_cursor_next is called on it. The database's read preference, read
26 concern, and write concern are not applied to the command, and mon‐
27 goc_cursor_next will not check the server response for a write concern
28 error or write concern timeout.
29
31 · database: A mongoc_database_t.
32
33 · flags: A mongoc_query_flags_t.
34
35 · skip: The number of documents to skip on the server.
36
37 · limit: The maximum number of documents to return from the cursor.
38
39 · batch_size: Attempt to batch results from the server in groups of
40 batch_size documents.
41
42 · command: A bson_t containing the command.
43
44 · fields: An optional bson_t containing the fields to return. NULL for
45 all fields.
46
47 · read_prefs: An optional mongoc_read_prefs_t. Otherwise, the command
48 uses mode MONGOC_READ_PRIMARY.
49
51 A mongoc_cursor_t.
52
53 The cursor should be freed with mongoc_cursor_destroy().
54
56 MongoDB, Inc
57
59 2017-present, MongoDB, Inc
60
61
62
63
641.13.1 Jan 24, 2019 MONGOC_DATABASE_COMMAND(3)