flip_api.trusts_services.services.trust
Functions
|
Retrieve a list of Trusts from the database. |
Module Contents
- flip_api.trusts_services.services.trust.get_trusts(session: sqlmodel.Session, ids: list[uuid.UUID] | None = None) list[flip_api.domain.interfaces.trust.ITrust]
Retrieve a list of Trusts from the database. If IDs are provided, only those Trusts will be returned. If no IDs are provided, all Trusts will be returned.
- Parameters:
session (Session) – The SQLModel session to use for the query.
ids (list[UUID] | None) – A list of Trust IDs to filter by. If None, all Trusts are returned.
- Returns:
A list of Trust objects.
- Return type:
list[ITrust]
- Raises:
ValueError – If no Trusts are found or if the database response is empty.