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.
I'd like to be able to identify which part of the query columns belong to.
For example, in
get_query_columnswill return["foo", "baz"]I think it would be useful to know that
"foo"is part of the projection, while"baz"is part of theWHEREclause.Since
get_query_columnskeep 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.