[CSHARP-4607] Support $all filters with more Contains methods Created: 09/Apr/23 Updated: 28/Oct/23 Resolved: 20/Apr/23 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | LINQ3 |
| Affects Version/s: | 2.19.1 |
| Fix Version/s: | 2.19.2 |
| Type: | Bug | 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 | ||
| Case: | (copied to CRM) |
| Backwards Compatibility: | Fully Compatible |
| Documentation Changes: | Not Needed |
| Documentation Changes Summary: | 1. What would you like to communicate to the user about this feature? |
| Description |
|
The following pattern:
is translated to the filter:
This is true of both LINQ2 and LINQ3.
However, LINQ3 currently only supports this pattern if the Contains method resolves to Enumerable.Contains. We need to support other Contains methods, for example ICollection.Contains. Instead of looking for specific Contains methods (there are many), we can see if the Contains method "looks" like a Contains method:
The Contains method could be either a static or an instance method:
|
| Comments |
| Comment by Githook User [ 18/May/23 ] |
|
Author: {'name': 'rstam', 'email': 'robert@robertstam.org', 'username': 'rstam'}Message: |
| Comment by Githook User [ 20/Apr/23 ] |
|
Author: {'name': 'rstam', 'email': 'robert@robertstam.org', 'username': 'rstam'}Message: |