sqlitis
sqlitis copied to clipboard
Table/column agreement in WHERE clauses
sqlitis does not recognize that an unqualified column in a where clause belongs to a particular table, especially when only one table is involved in the query.
Current behavior,
$ sqlitis 'select * from foo where id = 1'
select([foo]).where(text('id') == 1)
Expected behavior,
$ sqlitis 'select * from foo where id = 1'
select([foo]).where(foo.c.id == 1)
(Another consideration is subqueries with where clauses contained in where clauses. This likely extends to a bigger issue of table/column/alias correctness)