Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

SQLite: Translate Regex.IsMatch() #18845

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 closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. 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-current-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
@bricelam bricelam added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-query area-sqlite closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. good first issue This issue should be relatively straightforward to fix. type-enhancement
Projects
None yet
Development

No branches or pull requests

3 participants