You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Without going into details (but we know what|who hides there 😉) it seems easy to adapt the ReferencedRelations to do that, keeping track of the "statement" type in its visit_SelectStmt() method, possibly adding a new attribute by_stmt_type_names, a dictionary of sets.
I would start by copying the ReferencedRelations class into a standalone script, where you can experiment freely.
I would then add by_stmt_type_r_names attribute, initialized as an empty dictionary (or even a defaultdict(set) instance).
Then, whenever the code adds a name to the existing r_names set, it should also add the same name to the right set in by_stmt_type_r_names, creating the set if it does not already exist.
Hi @lelit ,
Not sure if this was already implemented, but it would be great if something like statement type can also be implemented like
query = 'insert into table_1 select * from table_2'
should give something like
[('InsertStmt', 'table_1'), ('SelectStmt', 'table_2')]
If this was already implemented please guide me to the link or the code-snippet.
Thanks in advance,
Raghu.
The text was updated successfully, but these errors were encountered: