1MONGOC_CURSOR_NEW_FROM_COMMANDM_ORMNEoGPnOLgCYo__DCWBUIRTCSHO_DROr_PiNTvESeW(r_3F)ROM_COMMAND_REPLY_WITH_OPTS(3)
2
3
4

NAME

6       mongoc_cursor_new_from_command_reply_with_opts       -      mongoc_cur‐
7       sor_new_from_command_reply_with_opts()
8

SYNOPSIS

10          mongoc_cursor_t *
11          mongoc_cursor_new_from_command_reply_with_opts (mongoc_client_t *client,
12                                                          bson_t *reply,
13                                                          const bson_t *opts);
14

PARAMETERS

16       · client: A mongoc_client_t.
17
18       · reply: The reply to a command, such as "aggregate", "find", or "list‐
19         Collections",  that returns a cursor document. The reply is destroyed
20         by mongoc_cursor_new_from_command_reply_with_opts  and  must  not  be
21         accessed afterward.
22
23       · opts: A bson_t.
24
25       opts may be NULL or a BSON document with additional options, which have
26       the  same   meaning   for   this   function   as   for   mongoc_collec‐
27       tion_find_with_opts:
28
29       · awaitData
30
31       · batchSize
32
33       · limit
34
35       · maxAwaitTimeMS
36
37       · serverId
38
39       · sessionId
40
41       · skip
42
43       · tailable
44

DESCRIPTION

46       Some MongoDB commands return a "cursor" document. For example, given an
47       "aggregate" command:
48
49          { "aggregate" : "collection", "pipeline" : [], "cursor" : {}}
50
51       The server replies:
52
53          {
54             "cursor" : {
55                "id" : 1234,
56                "ns" : "db.collection",
57                "firstBatch" : [ ]
58             },
59             "ok" : 1
60          }
61
62       mongoc_cursor_new_from_command_reply_with_opts is a low-level  function
63       that initializes a mongoc_cursor_t from such a reply.
64
65       Use  this function only for building a language driver that wraps the C
66       Driver. When writing applications in C, higher-level functions such  as
67       mongoc_collection_aggregate  are  more appropriate, and ensure compati‐
68       bility with a range of MongoDB versions.
69

RETURNS

71       A mongoc_cursor_t. On failure, the cursor's error  is  set.  Check  for
72       failure with mongoc_cursor_error.
73

AUTHOR

75       MongoDB, Inc
76
78       2017-present, MongoDB, Inc
79
80
81
82
831.13.1                       MONGJOaCn_C2U4R,SO2R0_1N9EW_FROM_COMMAND_REPLY_WITH_OPTS(3)
Impressum