Closed accforgithubtest closed 10 months ago
SQLPage needs to parse your queries in order to know which parameters to extract from the user's request to pass to the database, and to implement SQLPage functions.
To do that, it uses a very powerful and versatile SQL parser: sqlparser-rs. It's the same parser that is used in InfluxDB and Apache DataFusion, among others.
However, it may happen that some syntax that is valid in one database is not supported by the parser. When this happens, you can open an issue here with an example failing query, and we will implement it upstream in sqlparser. In this case, I opened this issue.
In the meantime, you can use the traditional function syntax for matching regular expressions:
select regexp_like('hello', '^hell');
instead of
select 'hello' REGEXP '^hell';
Thanks for the suggestions and also raising the issue, will give this a spin ! Thank you.
My patch to sqlparser-rs was merged, we'll soon have support for the REGEXP
operator in sqlpage :confetti_ball:
fix released in v0.15
thanks @lovasoa ! Just tried this with latest version and it works !
I have gotten sqlpage to work with mysql, and able to see the data on UI for a bunch of queries.
However, any query with a REGEXP in it seems to cause the error -
Is REGEXP somehow not supported in sqlpage ? [I have confirmed the exact same query to be working outside sqlpage.]