[CSHARP-3478] LINQ3: Simplify translations for logical negation Created: 15/Mar/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: Major - P3
Reporter: Robert Stam Assignee: Robert Stam
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by CSHARP-3473 LINQ3: Get PredicateTranslatorTests t... Closed
Related
related to CSHARP-3486 LINQ3: Translate negation of $in to $nin Closed
Epic Link: CSHARP-2608

 Description   

Add an AstFilter.Not factory method that applies logical negation in a more sophisticated way:

  1. Use $not when possible and $nor otherwise
  2. Two $not cancel each other out
  3. Two single filter $nor cancel each other out
  4. Negated $eq becomes $ne and vice versa

 



 Comments   
Comment by Robert Stam [ 15/Mar/21 ]

Done but not reviewed

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