Skip to content

Identify which part of the query columns are a part of #78

@smaspe

Description

@smaspe

I'd like to be able to identify which part of the query columns belong to.

For example, in

SELECT foo FROM bar WHERE baz = 1

get_query_columns will return ["foo", "baz"]

I think it would be useful to know that "foo" is part of the projection, while "baz" is part of the WHERE clause.

Since get_query_columns keep track of the keyword the column belongs too (https://github.com/macbre/sql-metadata/blob/master/sql_metadata.py#L132), it should be possible to associate the column to it's query part.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions