1MONGOC_CLIENT_COMMAND_SIMPLE(3)    libmongoc   MONGOC_CLIENT_COMMAND_SIMPLE(3)
2
3
4

NAME

6       mongoc_client_command_simple - mongoc_client_command_simple()
7

SYNOPSIS

9          bool
10          mongoc_client_command_simple (mongoc_client_t *client,
11                                        const char *db_name,
12                                        const bson_t *command,
13                                        const mongoc_read_prefs_t *read_prefs,
14                                        bson_t *reply,
15                                        bson_error_t *error);
16
17       This  is  a simplified interface to mongoc_client_command(). It returns
18       the first document from the result cursor into reply. The client's read
19       preference, read concern, and write concern are not applied to the com‐
20       mand.
21
22       WARNING:
23          reply is always set, and should be released with bson_destroy().
24
25       This function is not considered a retryable read operation.
26

PARAMETERS

28client: A mongoc_client_t.
29
30db_name: The name of the database to run the command on.
31
32command: A bson_t containing the command specification.
33
34read_prefs: An optional mongoc_read_prefs_t. Otherwise,  the  command
35         uses mode MONGOC_READ_PRIMARY.
36
37reply: A location for the resulting document.
38
39error: An optional location for a bson_error_t or NULL.
40

ERRORS

42       Errors are propagated via the error parameter.
43

RETURNS

45       Returns  true  if successful. Returns false and sets error if there are
46       invalid arguments or a server or network error.
47
48       This function does not check the server response for  a  write  concern
49       error or write concern timeout.
50

AUTHOR

52       MongoDB, Inc
53
55       2017-present, MongoDB, Inc
56
57
58
59
601.17.6                           Jun 03, 2021  MONGOC_CLIENT_COMMAND_SIMPLE(3)
Impressum