Module stac_fastapi.core.base_database_logic¶
Base database logic.
Classes¶
BaseDatabaseLogic¶
class BaseDatabaseLogic(
/,
*args,
**kwargs
)
Abstract base class for database logic.
This class defines the basic structure and operations for database interactions. Subclasses must provide implementations for these methods.
Ancestors (in MRO)¶
- abc.ABC
Methods¶
create_collection¶
def create_collection(
self,
collection: Dict,
refresh: bool = False
) -> None
Create a collection in the database.
create_item¶
def create_item(
self,
item: Dict,
refresh: bool = False
) -> None
Create an item in the database.
delete_collection¶
def delete_collection(
self,
collection_id: str,
refresh: bool = False
) -> None
Delete a collection from the database.
delete_item¶
def delete_item(
self,
item_id: str,
collection_id: str,
refresh: bool = False
) -> None
Delete an item from the database.
find_collection¶
def find_collection(
self,
collection_id: str
) -> Dict
Find a collection in the database.
get_all_collections¶
def get_all_collections(
self,
token: Union[str, NoneType],
limit: int
) -> Iterable[Dict[str, Any]]
Retrieve a list of all collections from the database.
get_one_item¶
def get_one_item(
self,
collection_id: str,
item_id: str
) -> Dict
Retrieve a single item from the database.