1MONGOC_DATABASE_COMMAND_SIMPLE(3M)ongoDB C DriveMrONGOC_DATABASE_COMMAND_SIMPLE(3)
2
3
4

NAME

6       mongoc_database_command_simple - mongoc_database_command_simple()
7

SYNOPSIS

9          bool
10          mongoc_database_command_simple (mongoc_database_t *database,
11                                          const bson_t *command,
12                                          const mongoc_read_prefs_t *read_prefs,
13                                          bson_t *reply,
14                                          bson_error_t *error);
15

PARAMETERS

17       · database: A mongoc_database_t.
18
19       · command: A bson_t containing the command.
20
21       · read_prefs:  An  optional mongoc_read_prefs_t. Otherwise, the command
22         uses mode MONGOC_READ_PRIMARY.
23
24       · reply: A location to store the commands first result document.
25
26       · error: An optional location for a bson_error_t or NULL.
27
28       This  is  a  simplified  interface  to  mongoc_database_command()  that
29       returns the first result document. The database's read preference, read
30       concern, and write concern are not applied to the command.  The parame‐
31       ter  reply  is initialized even upon failure to simplify memory manage‐
32       ment.
33

ERRORS

35       Errors are propagated through the error parameter.
36

RETURNS

38       Returns true if successful. Returns false and sets error if  there  are
39       invalid arguments or a server or network error.
40
41       This  function  does  not check the server response for a write concern
42       error or write concern timeout.
43

AUTHOR

45       MongoDB, Inc
46
48       2017-present, MongoDB, Inc
49
50
51
52
531.14.0                           Feb 22, 2019MONGOC_DATABASE_COMMAND_SIMPLE(3)
Impressum