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       When  synthesizing a completed cursor response that has no more batches
66       (i.e. with cursor id 0), serverId may be 0. If the cursor  response  is
67       not  completed (i.e. with non-zero cursor id), pass the serverId of the
68       server used to create the cursor.
69
70       Use this function only for building a language driver that wraps the  C
71       Driver.  When writing applications in C, higher-level functions such as
72       mongoc_collection_aggregate() are more appropriate, and ensure compati‐
73       bility with a range of MongoDB versions.
74

RETURNS

76       A  mongoc_cursor_t.  On  failure,  the cursor's error is set. Check for
77       failure with mongoc_cursor_error().
78

AUTHOR

80       MongoDB, Inc
81
83       2017-present, MongoDB, Inc
84
85
86
87
881.24.3                       MONGAOuCg_C1U7R,SO2R0_2N3EW_FROM_COMMAND_REPLY_WITH_OPTS(3)
Impressum