sqlparse
sqlparse copied to clipboard
is there bug in get_xxx_name?
a = sqlparse.parse('select c from b.dual t')[0] print a.get_name() t print a.get_real_name() c print a.get_parent_name() None
a = sqlparse.parse('select c,d from b.dual t')[0] print a.get_name() t print a.get_real_name() dual print a.get_parent_name() None
i am just update my sqlparse to master version and test it. it can not parse 'select c from b.dual t' correctly,get_real_name() return col name
I have the same problem. I want to get just the table names (foo).
select f1.a,f1.b,f1.c
from foo as f1
join foo as f2 on f1.id=f2.id