mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Database.get_outbound_foreign_keys() refactor
Following this, the only module that ever makes calls to the low-level execute_against_connection_in_thread() method is datasette/database.py
This commit is contained in:
parent
20f98c3e20
commit
edb36629e7
3 changed files with 13 additions and 16 deletions
|
|
@ -205,6 +205,11 @@ class Database:
|
|||
self.name, get_all_foreign_keys
|
||||
)
|
||||
|
||||
async def get_outbound_foreign_keys(self, table):
|
||||
return await self.ds.execute_against_connection_in_thread(
|
||||
self.name, lambda conn: get_outbound_foreign_keys(conn, table)
|
||||
)
|
||||
|
||||
async def get_table_definition(self, table, type_="table"):
|
||||
table_definition_rows = list(
|
||||
await self.ds.execute(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue