sqlalchemy_async_repositories.interfaces ======================================== .. py:module:: sqlalchemy_async_repositories.interfaces .. autoapi-nested-parse:: Repository interface definitions. Attributes ---------- .. autoapisummary:: sqlalchemy_async_repositories.interfaces.T Classes ------- .. autoapisummary:: sqlalchemy_async_repositories.interfaces.IRepository Module Contents --------------- .. py:data:: T .. py:class:: IRepository Bases: :py:obj:`abc.ABC`, :py:obj:`Generic`\ [\ :py:obj:`T`\ ] Base repository interface for common database operations. .. py:method:: get_by_id(entity_id: Any) -> Optional[T] :abstractmethod: :async: Get entity by ID. .. py:method:: create(entity: T) -> T :abstractmethod: :async: Create new entity. .. py:method:: update(entity: T) -> T :abstractmethod: :async: Update existing entity. .. py:method:: delete(entity_id: Any) -> bool :abstractmethod: :async: Delete entity by ID. .. py:method:: get_all(limit: Optional[int] = None, offset: int = 0) -> List[T] :abstractmethod: :async: Get all entities with optional pagination. .. py:method:: exists(entity_id: Any) -> bool :abstractmethod: :async: Check if entity exists by ID. .. py:method:: count() -> int :abstractmethod: :async: Get total count of entities.