Skip to content

Table/column agreement in WHERE clauses #34

@pglass

Description

@pglass

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions