QueryBuilder generates wrong column name for mySQL

Hi,
I'm trying to generate table filters using the QueryBuilder component.
I'm using MySQL database which users backticks (`) as column escaping, or no escaping at all.
The problem is that the QueryBuilder component escapes the columns using double quotes - which is evaluated as a string.
I was able to hotfix it by using
{{querybuilder1.asSql.replace(/"/g,'`')}}
but it feels so hacky...

How should I proceed, it seems that queryBuilder should be SQL flavour-aware
Thanks!

Hey there @ido,

Unfortunately, I believe that right now, what you are doing is the best way to handle this behavior. I agree with you though, this would definitely be a nice feature to have. I have made a note for our engineering team of this as a feature request, but I will also move this thread to the Feature Requests section of the forums so that other users who are interested can chime in.

1 Like