[CSHARP-3604] LINQ3: Add Create and With methods to ExecutableQuery Created: 22/Apr/21  Updated: 28/Oct/23  Resolved: 04/Oct/21

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

Type: Task Priority: Unknown
Reporter: Robert Stam Assignee: Robert Stam
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: CSHARP-2608

 Description   

Add the following methods to ExecutableQuery

public static ExecutableQuery<TDocument, TOutput, TResult> Create<TDocument, TOutput, TResult>(
    IMongoCollection<TDocument> collection,
    AggregateOptions options,
    AstPipeline unoptimizedPipeline,
    IExecutableQueryFinalizer<TOutput, TResult> finalizer)
 
public abstract ExecutableQuery<TDocument, TResult> WithCollection(IMongoCollection<TDocument> collection);
 
public abstract ExecutableQuery<TDocument, TResult> WithOptions(AggregateOptions options);
 

The new Create factory method facilitates creating new instances more succinctly, and the two new With methods will be used by QueryableExecutionModel3 when wrapping an ExecutableQuery.

 



 Comments   
Comment by Robert Stam [ 22/Apr/21 ]

Done but not reviewed

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