Simplify worms.get_tables with select_column.

This commit is contained in:
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

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: