Add the Multi-Tenant Catalogs Endpoint Extension, for nested catalog support#366
Add the Multi-Tenant Catalogs Endpoint Extension, for nested catalog support#366jonhealy1 wants to merge 3 commits intostac-utils:mainfrom
Conversation
|
It's going to be best to fix the extension so it supports python 3.11 |
| async with request.app.state.get_connection(request, "r") as conn: | ||
| logger.debug("Attempting to fetch all catalogs from database") | ||
| q, p = render( | ||
| """ |
There was a problem hiding this comment.
Rather than querying the collections table directly, you should build all of these on catalog_search. The tables in pgstac have no guarantee of stability if we need to modify the table structure when we are doing improvements while we try very hard to maintain the api contract for the search and collection_search functions. So, for this one, you should be able to do SELECT collection_search('{"filter":{"op":"=","args":[{"property":"type"},"Catalog"]},"limit":1}' (or close to that, I didn't actually check that query). I think you should be able to do everything you want with CQL2 array operators, if there is any pgstac/cql2 functionality that might be missing I can make a priority to get it added into pgstac.
There was a problem hiding this comment.
Thanks - really good to know!
Related Issue(s):
Description:
Extension spec: https://github.com/StacLabs/multi-tenant-catalogs
STAC-FastAPI catalogs extension: https://github.com/StacLabs/stac-fastapi-catalogs-extension
PR Checklist:
pre-commithooks pass locallymake test)make docs)