Skip to content

AsyncCursorsDao

Async counterpart of CursorsDao: an interface for projector-cursor storage. Reuses exception types from CursorsDao; all I/O methods are coroutines.

Source code in event_sourcery/read_model/projector_async.py
class AsyncCursorsDao:
    """
    Async counterpart of `CursorsDao`: an interface for projector-cursor
    storage. Reuses exception types from `CursorsDao`; all I/O methods are
    coroutines.
    """

    StreamNotTracked = CursorsDao.StreamNotTracked
    BehindStream = CursorsDao.BehindStream
    AheadOfStream = CursorsDao.AheadOfStream

    async def increment(self, name: str, stream_id: StreamId, version: int) -> None:
        raise NotImplementedError()

    async def put_at(self, name: str, stream_id: StreamId, version: int) -> None:
        raise NotImplementedError()

    async def move_to(self, name: str, stream_id: StreamId, version: int) -> None:
        raise NotImplementedError()