sqlitis icon indicating copy to clipboard operation
sqlitis copied to clipboard

Table/column agreement in WHERE clauses

Open pglass opened this issue 5 years ago • 0 comments

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)

pglass avatar Jan 31 '20 02:01 pglass