Skip to content

Commit

Permalink
Chore: Adjust database adapter for cratedb-sqlparse 0.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Aug 14, 2024
1 parent 882ba94 commit e9dd340
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cratedb_toolkit/util/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,5 +392,8 @@ def get_table_names(sql: str) -> t.List[t.List[str]]:
names = []
statements = sqlparse_cratedb(sql)
for statement in statements:
names.append([statement.metadata.table_name])
local_names = []
for table in statement.metadata.tables:
local_names.append(table.name)
names.append(local_names)
return names

0 comments on commit e9dd340

Please sign in to comment.