You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
tatulea
changed the title
Validation of boo for WHERE clause might be unnecessary
Validation of bool for WHERE clause might be unnecessary
Sep 18, 2020
Hi @tatulea, thanks for opening an issue :)
mysql/MariaDB indeed supports WHERE conditions on other column types than boolean. Good catch, thanks for reporting it.
I based myself on postgresql, where the condition is stricter:
ERROR: argument of WHERE must be type boolean, not type integer
LINE 1: select * from sometable where id;
I'll probably make the validation a bit more permissive for now (even though the validation is only partly implemented)
There are SQL queries that don't have a bool type in the where clause (e.g.: the usage of JSON_CONTAINS_PATH).
sqlvalidator/sqlvalidator/grammar/sql.py
Line 250 in 6b87323
The text was updated successfully, but these errors were encountered: