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

SYNOPSIS

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

PARAMETERS

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

ERRORS

39       Errors are propagated via the error parameter.
40

RETURNS

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

AUTHOR

49       MongoDB, Inc
50
52       2017-present, MongoDB, Inc
53
54
55
56
571.25.1                           Nov 08, 2023  MONGOC_CLIENT_COMMAND_SIMPLE(3)
Impressum