Skip to content

How to use REGEXP in MySQL? #4379

Answered by weiznich
failable asked this question in Q&A
Discussion options

You must be logged in to vote

According to the mysql documentation is REGEXP an operator and not a function. That means using define_sql_function! won't work as that translates to a function call in the generated SQL.

Instead you likely want to use diesel::infix_operator! to define the corresponding operator.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@failable
Comment options

Answer selected by failable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants