-
After googling, I come up with this
and use it like
But I get errors like this
What is the official to use REGEXP in diesel? Thanks. |
Beta Was this translation helpful? Give feedback.
Answered by
weiznich
Dec 6, 2024
Replies: 1 comment 1 reply
-
According to the mysql documentation is Instead you likely want to use |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
failable
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
According to the mysql documentation is
REGEXP
an operator and not a function. That means usingdefine_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.