[CSHARP-798] Support Aggregate Command Returning a Cursor Created: 12/Aug/13  Updated: 27/May/22  Resolved: 05/Sep/13

Status: Closed
Project: C# Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 1.9

Type: New Feature Priority: Major - P3
Reporter: Craig Wilson Assignee: Robert Stam
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-5932 support cursor based aggregation Closed
is depended on by DRIVERS-98 Aggregation command can optionally re... Closed
Server Compat: 2.5

 Description   

Server 2.6 can optionally return a cursor and the driver needs to support that.



 Comments   
Comment by auto [ 05/Sep/13 ]

Author:

{u'username': u'rstam', u'name': u'rstam', u'email': u'robert@10gen.com'}

Message: CSHARP-798: Removing support for FirstBatchSize in response to code review comments. Leaving BatchSize nullable to avoid using a magic number.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/397cfe04e49f81764211d9843055c44bbc52a612

Comment by auto [ 05/Sep/13 ]

Author:

{u'username': u'rstam', u'name': u'rstam', u'email': u'robert@10gen.com'}

Message: CSHARP-798: Give the user control over both the FirstBatchSize and the subsequent BatchSize when using AggregateQuery with a cursor. A FirstBatchSize of 0 instructs the server to just set up the cursor and return immediately with an empty first batch. FirstBatchSize defaults to BatchSize if not specified. If neither is specified the server picks the batch size.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/0eede69d71f80020d4d0e4a3d3a114ff50bf64a3

Comment by auto [ 05/Sep/13 ]

Author:

{u'username': u'rstam', u'name': u'rstam', u'email': u'robert@10gen.com'}

Message: CSHARP-798: Execute AggregateQuery immediately if $out is used. Remove FirstBatch property from AggregateResult and overload ResultDocuments to also hold the first batch when using a cursor. Add new RunAggregateCommand helper method to MongoCollection and remove overload of Aggregate command that takes an options parameter (so if you want to use a cursor, which requires options, you have to use the new AggregateQuery method).
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/e1d80a7c314760dff89f1122c9ff216577907d11

Comment by auto [ 05/Sep/13 ]

Author:

{u'username': u'rstam', u'name': u'rstam', u'email': u'robert@10gen.com'}

Message: CSHARP-798. Initial implementation finished and all unit tests pass, including new unit tests for aggregate with a cursor and with $out.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/6e9b0e8660460dac4bb036c9276431372a47a47c

Comment by auto [ 05/Sep/13 ]

Author:

{u'username': u'rstam', u'name': u'rstam', u'email': u'robert@10gen.com'}

Message: CSHARP-798: Added new AggregateQuery method that behaves more like a query and delays sending the command to the server until the results are enumerated.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/18104252100e00002095395a1e6c255431bfd859

Comment by auto [ 05/Sep/13 ]

Author:

{u'username': u'rstam', u'name': u'rstam', u'email': u'robert@10gen.com'}

Message: CSHARP-798: Added AllowDiskUsage to MongoAggregateOptions.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/ee7409f7f1753a46fea13976810852c7b3614768

Comment by auto [ 05/Sep/13 ]

Author:

{u'username': u'rstam', u'name': u'rstam', u'email': u'robert@10gen.com'}

Message: CSHARP-798: Prototype public API of supporting Aggregate command with cursors.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/8b8dafe281c97f09cfcfb93019062d06c43a7e93

Generated at Wed Feb 07 21:37:51 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.