1MONGOC_CLIENT_COMMAND_SIMPLE(3)MongoDB C DriverMONGOC_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

PARAMETERS

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

ERRORS

40       Errors are propagated via the error parameter.
41

RETURNS

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

AUTHOR

50       MongoDB, Inc
51
53       2017-present, MongoDB, Inc
54
55
56
57
581.13.1                           Jan 24, 2019  MONGOC_CLIENT_COMMAND_SIMPLE(3)
Impressum