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

REGEXP operator support for MySQL #617

Closed
1 task
JRubics opened this issue Apr 6, 2022 · 3 comments · Fixed by #618
Closed
1 task

REGEXP operator support for MySQL #617

JRubics opened this issue Apr 6, 2022 · 3 comments · Fixed by #618
Labels
enhancement A feature that exists, works as intended but needs to be improved feature request A feature that does not yet exist but will be a good addition to the library

Comments

@JRubics
Copy link
Contributor

JRubics commented Apr 6, 2022

Hi, we would like to be able to use REGEXP when making queries on MySQL database.

Currently when we try to execute this code:

query.where('name', 'regexp', f'^{value}(-[0-9]+)?$') 

we get error:
ValueError: Invalid comparison operator. The operator can be =, >, >=, <, <=, !=, <>, like, not like

I think this change should be added to the QueryBuilder, Grammars (not only Mysql) and expressions (JoinClause).

  • Is this a breaking change?
@JRubics JRubics added the enhancement A feature that exists, works as intended but needs to be improved label Apr 6, 2022
@josephmancuso
Copy link
Member

josephmancuso commented Apr 6, 2022

Agreed. I believe we can add this pretty simply.

@josephmancuso josephmancuso added the feature request A feature that does not yet exist but will be a good addition to the library label Apr 7, 2022
@josephmancuso
Copy link
Member

Added in v2.6.0

@JRubics
Copy link
Contributor Author

JRubics commented Apr 7, 2022

Thanks! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A feature that exists, works as intended but needs to be improved feature request A feature that does not yet exist but will be a good addition to the library
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants