diff --git a/oml/db.py b/oml/db.py index 5d0f3cd..0a45b98 100644 --- a/oml/db.py +++ b/oml/db.py @@ -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