1MONGOC_DATABASE_COMMAND_SIMPLE(3)  libmongoc MONGOC_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
34       This function is not considered a retryable read operation.
35

ERRORS

37       Errors are propagated through the error parameter.
38

RETURNS

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

AUTHOR

47       MongoDB, Inc
48
50       2017-present, MongoDB, Inc
51
52
53
54
551.16.2                           Feb 25, 2020MONGOC_DATABASE_COMMAND_SIMPLE(3)
Impressum