@@ -4,8 +4,7 @@ mongoc_collection_aggregate(3)
4
4
5
5
NAME
6
6
----
7
- mongoc_collection_aggregate, mongoc_collection_aggregate_legacy - Execute an
8
- 'aggregation' query
7
+ mongoc_collection_aggregate - Execute an 'aggregation' query
9
8
10
9
11
10
SYNOPSIS
@@ -17,14 +16,6 @@ mongoc_collection_aggregate (mongoc_collection_t *collection,
17
16
mongoc_query_flags_t flags,
18
17
const bson_t *pipeline,
19
18
const mongoc_read_prefs_t *read_prefs)
20
-
21
- bson_bool_t
22
- mongoc_collection_aggregate_legacy (mongoc_collection_t *collection,
23
- mongoc_query_flags_t flags,
24
- const bson_t *pipeline,
25
- const mongoc_read_prefs_t *read_prefs,
26
- bson_t *reply,
27
- bson_error_t *error);
28
19
-----------------------
29
20
30
21
@@ -35,26 +26,23 @@ on the underlying 'collection'. The bson 'pipeline' is not validated, simply
35
26
passed along as appropriate to the server. As such, compatibility and errors
36
27
should be validated in the appropriate server documentation.
37
28
38
- 'flags' are the same as in linkmongoc:mongoc_collection_find[3].
29
+ In the case of older server versions, < v2.5, the returned cursor is a
30
+ synthetic iterator over the result set. This provides a limitation insofar as
31
+ returned documents can be no larger than 16MB. When connecting to newer
32
+ servers this limitation doesn't exist. The specific test is for wire_version >
33
+ 0.
39
34
40
- The difference between _mongoc_collection_aggregate()_ and
41
- _mongoc_collection_aggregate_legacy()_ has to do with currenly non-discoverable
42
- changes in the aggegation api between mongodb 2.4 and 2.6. The legacy api
43
- returns values in 'reply', the non-legacy version returns a cursor.
35
+ 'flags' are the same as in linkmongoc:mongoc_collection_find[3].
44
36
45
37
RETURN VALUE
46
38
------------
47
39
The _mongoc_collection_aggregate()_ function returns a new
48
40
linkmongoc:mongoc_cursor[7] if successful. It returns NULL in the event of
49
41
failure.
50
42
51
- The _mongoc_collection_aggregate_legacy()_ function returns true if successful
52
- and places the output value in 'reply'.
53
-
54
43
ERRORS
55
44
------
56
- errors are detected through active use of the linkmongoc:mongoc_cursor[7] or
57
- through 'error'.
45
+ errors are detected through active use of the linkmongoc:mongoc_cursor[7].
58
46
59
47
60
48
SEE ALSO
0 commit comments