ankane / blazer

Business intelligence made simple
MIT License
4.56k stars 474 forks source link

Escape Characters for Queries #358

Closed wdenny3885 closed 3 years ago

wdenny3885 commented 3 years ago

I have searched the documentation, as well as posted to stack exchange.

I can't seem to get blazer to work when searching strings in a query and using " or '. I have tried all the PG escape methods to no avail.

Stack Exchange: https://stackoverflow.com/questions/68925787/blazer-escape-characters/68926197?noredirect=1#comment121813464_68926197

SELECT * FROM "search_filters"
where "params" like '%with_vehicles_id"=>[%'
LIMIT 100

Error:

syntax error at or near "LIMIT" LINE 3: LIMIT 100 LIMIT 1000 /*blazer,user_id:189,user_name:...^
wdenny3885 commented 3 years ago

We did some further research, and it looks like, because we have a limit configured in the configuration, it is having issues w/ the ". When i remove the limit from my query it runs, but does NOT apply the configuration limit put in the config.

wdenny3885 commented 3 years ago

image

when looking at the audits, it looks like, when putting in a single quote, in a query search string, and using a limit, it is trying to add another limit to the query , which is our config limit...

ankane commented 3 years ago

Hey @wdenny3885, it looks like you may be running a modified version of Blazer that adds an extra limit.