sqlparse icon indicating copy to clipboard operation
sqlparse copied to clipboard

is there bug in get_xxx_name?

Open 1987jy opened this issue 6 years ago • 1 comments

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

1987jy avatar Aug 19 '19 07:08 1987jy

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

az0 avatar May 26 '20 20:05 az0