Skip to content

EXPERIMENTAL: Refactor #272

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions stac_fastapi/core/stac_fastapi/core/base_database_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ async def get_all_collections(
pass

@abc.abstractmethod
async def get_one_item(self, collection_id: str, item_id: str) -> Dict:
"""Retrieve a single item from the database."""
async def get_item(self, collection_id: str, item_id: str) -> Dict:
"""Retrieve an item from the database."""
pass

@abc.abstractmethod
Expand All @@ -37,13 +37,20 @@ async def delete_item(
pass

@abc.abstractmethod
async def create_collection(self, collection: Dict, refresh: bool = False) -> None:
"""Create a collection in the database."""
async def item_search(
self, item_id: str, collection_id: str, refresh: bool = False
) -> None:
"""Retrieve items that match query from the database."""
pass

@abc.abstractmethod
async def find_collection(self, collection_id: str) -> Dict:
"""Find a collection in the database."""
async def get_collection(self, collection_id: str) -> Dict:
"""Retrieve a collection in the database."""
pass

@abc.abstractmethod
async def create_collection(self, collection: Dict, refresh: bool = False) -> None:
"""Create a collection in the database."""
pass

@abc.abstractmethod
Expand Down
Loading
Loading