better get_table_columns
This commit is contained in:
parent
b00647e3f3
commit
0faea277d1
1 changed files with 2 additions and 1 deletions
|
@ -95,7 +95,8 @@ def get_create_table(table):
|
|||
|
||||
def get_table_columns(table):
|
||||
create_table = get_create_table(table)
|
||||
columns = [r.strip().split()[0] for r in re.compile('(.*?),').findall(create_table)][:-1]
|
||||
columns = create_table.split('(', 1)[1].rsplit(')', 1)[0]
|
||||
columns = [r.strip().split()[0] for r in re.compile('(.*?),').findall(columns)]
|
||||
columns = [col for col in columns if col.islower()]
|
||||
return columns
|
||||
|
||||
|
|
Loading…
Reference in a new issue