Skip to content

SQLite: Translate Regex.IsMatch() #18845

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
Tracked by #22950
bricelam opened this issue Nov 11, 2019 · 0 comments
Closed
Tracked by #22950

SQLite: Translate Regex.IsMatch() #18845

bricelam opened this issue Nov 11, 2019 · 0 comments
Assignees
Labels
area-query area-sqlite good first issue This issue should be relatively straightforward to fix. type-enhancement
Milestone

Comments

@bricelam
Copy link
Contributor

bricelam commented Nov 11, 2019

We have to register a user-defined function, so maybe it should be behind an off-by-default option: (but since this is a well-known function and it's hard to imagine another implementation, maybe it's OK just to always do it in EF)

options.UseSqlite(connection, x => x.EnableRegex());

It would register this function:

CreateFunction("regexp", (string pattern, string input) => Regex.IsMatch(input, pattern));

This translation would be enabled:

.NET SQL
Regex.IsMatch(input, pattern) regexp($pattern, $input)
@ajcvickers ajcvickers added this to the Backlog milestone Nov 11, 2019
@bricelam bricelam changed the title SQLite: Translate Regex.Match() SQLite: Translate Regex.IsMatch() Jan 22, 2020
@bricelam bricelam self-assigned this Feb 21, 2020
@bricelam bricelam added consider-for-next-release good first issue This issue should be relatively straightforward to fix. labels Feb 21, 2020
scomert added a commit to scomert/efcore that referenced this issue Sep 11, 2020
scomert added a commit to scomert/efcore that referenced this issue Sep 13, 2020
scomert added a commit to scomert/efcore that referenced this issue Sep 13, 2020
scomert added a commit to scomert/efcore that referenced this issue Sep 13, 2020
bricelam pushed a commit to scomert/efcore that referenced this issue Oct 30, 2020
@bricelam bricelam modified the milestones: Backlog, 6.0.0 Oct 30, 2020
bricelam pushed a commit to scomert/efcore that referenced this issue Oct 30, 2020
bricelam pushed a commit to scomert/efcore that referenced this issue Oct 30, 2020
@ajcvickers ajcvickers modified the milestones: 6.0.0, 6.0.0-preview1 Jan 27, 2021
@ajcvickers ajcvickers modified the milestones: 6.0.0-preview1, 6.0.0 Nov 8, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
area-query area-sqlite good first issue This issue should be relatively straightforward to fix. type-enhancement
Projects
None yet
Development

No branches or pull requests

3 participants