1MONGOC_CURSOR_NEW_FROM_COMMANDM_ORNEGPOLCYl__iCWbUImRToSHnO_gROo_PcNTESW(_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

16client: A mongoc_client_t.
17
18reply: 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 ac‐
21         cessed afterward.
22
23opts: 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
27       mongoc_collection_find_with_opts():
28
29awaitData
30
31batchSize
32
33limit
34
35maxAwaitTimeMS
36
37serverId
38
39sessionId
40
41skip
42
43tailable
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.23.1                       MONGOOcCt_C2U0R,SO2R0_2N2EW_FROM_COMMAND_REPLY_WITH_OPTS(3)
Impressum