sql-metadata
sql-metadata copied to clipboard
Get values of WHERE, ORDER BY clauses
Hi, using parser.columns_dict
I can get columns in WHERE, ORDER BY clauses, but also I'd like to get values too.
For instance, let`s say I have a query like
SELECT * FROM WHERE a_col = "some_val"
in this case, columns_dict
returns that the a_col appears in WHERE clause. Also I want to get that a_col = "some_val"
Another case is
SELECT * FROM ORDER BY a_col DESC"
in this case, I want to get the value like a_col DESC
Is there any methods I can use to get a similar result, or maybe you can suggest how can I get these values Thanks
This will be a great feature!
indeed, I am also looking for something like this. But I wonder how can we know the and
and or
from the column_dict