In-memory _schemas database tracking schemas of attached tables, closes #1150

This commit is contained in:
Simon Willison 2020-12-18 14:34:05 -08:00
commit ebc7aa287c
8 changed files with 279 additions and 6 deletions

View file

@ -115,6 +115,8 @@ class BaseView:
return Response.text("Method not allowed", status=405)
async def dispatch_request(self, request, *args, **kwargs):
if self.ds:
await self.ds.refresh_schemas()
handler = getattr(self, request.method.lower(), None)
return await handler(request, *args, **kwargs)