You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Marusyk if possible, translating built-in .NET functions is preferred. For example, the PG provider supports regex by translating Regex.IsMatch(stringValue, "^A+") (see docs).
Activity
roji commentedon May 23, 2022
This isn't currently supported, but you can use raw SQL queries to call the function in SQL yourself.
Cosmos docs for the function
sekarcse commentedon May 23, 2022
Thanks @roji for the quick reply
Marusyk commentedon May 25, 2022
@roji @AndriySvyryd What is your point of view for implementing this feature?
smth like this?
roji commentedon May 25, 2022
@Marusyk if possible, translating built-in .NET functions is preferred. For example, the PG provider supports regex by translating
Regex.IsMatch(stringValue, "^A+")(see docs).AndriySvyryd commentedon May 25, 2022
Adding to what @roji said you can also translate some of the options, but throw for the ones not supported by Cosmos.
[-]How to use RegexMatch in EF Core C#[/-][+]Cosmos: Translate regex matching[/+]roji commentedon May 26, 2022
Note: we also already translate Regex.IsMatch in SQLite and have tests for it in NorthwindFunctionsQueryTestBase.
Cosmos: Add translator for Regex.IsMatch method
Cosmos: Add translator for Regex.IsMatch method (#28121)