Simplify worms.get_tables with select_column.

master
voussoir 2022-03-19 19:51:25 -07:00
parent 6867fb3011
commit 59df12a23f
No known key found for this signature in database
GPG Key ID: 5F7554F8C26DACCB
1 changed files with 1 additions and 2 deletions

View File

@ -266,8 +266,7 @@ class Database(metaclass=abc.ABCMeta):
Return the set of all table names in the database.
'''
query = 'SELECT name FROM sqlite_master WHERE type = "table"'
table_rows = self.select(query)
tables = set(name for (name,) in table_rows)
tables = set(self.select_column(query))
return tables
def insert(self, table, data) -> None: