[CSHARP-2077] Fully support Trim functions in queries Created: 31/Oct/17  Updated: 04/Jan/21  Resolved: 04/Jan/21

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

Type: New Feature Priority: Minor - P4
Reporter: David Golub Assignee: David Golub
Resolution: Won't Fix Votes: 0
Labels: skunk
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

We currently support the Trim, TrimStart, and TrimEnd functions in queries when the resulting string is passed to a function such as Contains, StartsWith, or EndsWith. However, they are not currently supported in conjunction with a comparison operator. For example:

Find(model => model.Name.Trim() == "John")



 Comments   
Comment by Boris Dogadov [ 04/Jan/21 ]

Hi david.golub thank you for this PR.

 Trim/TrimStart/{{TrimEnd }}functionality will be supported by the next LINQ provider version by utilizing the $trim operator. Therefore closing this PR as the issue will be fixed in a later driver version that won’t require the use of regular expressions.

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