Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-3420

LINQ3: Translate string.EndsWith in filters

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 2.14.0
    • None
    • LINQ3
    • None

    Description

      Translate:

      collection.Where(x => x.S.EndsWith(v))
      

      where S is a string property and v is a string constant to:

      { $match : { s : /v'$/ } }
      

      where v' is the Regex escaped version of v.

      Attachments

        Activity

          People

            robert@mongodb.com Robert Stam
            robert@mongodb.com Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: