Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
12.1
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
Statistic
FMM
Blog
Creates an aggregate collection.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
MongoDB | 13.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example | Flags |
---|---|---|---|
MongoDBRef | The reference number for the mongo connection. | $MongoDB | |
Flags | The flags. | 0 | |
Pipeline | The pipeline as JSON. | "[ { "$match" : { "index" : 123 } }, { "$sort" : { "index" : -1 } }, { "$limit" : 2 } ]" |
|
Options | JSON with options. | Optional |
Returns OK or error.
Flag | Value | Description |
None | 0 | Specify no query flags. |
TailableCursor | 2 | Cursor will not be closed when the last data is retrieved. You can resume this cursor later. |
SecondaryOk | 4 | Allow query of replica set secondaries. |
NoCursorTimeout | 16 | The server normally times out an idle cursor after an inactivity period (10 minutes). This prevents that. |
AwaitData | 32 | Use with TailableCursor. Block rather than returning no data. After a period, time out. |
Exhaust | 64 | Stream the data down full blast in multiple “reply” packets. Faster when you are pulling down a lot of data and you know you want to retrieve it all. Only applies to cursors created from a find operation (i.e. find) |
Partial | 128 | Get partial results from mongos if some shards are down (instead of throwing an error). |
This function checks for a license.
Created 3th February 2023, last changed 3th February 2023