Skip to content

castlecraft_engineer.abstractions.query

castlecraft_engineer.abstractions.query

Query dataclass

Bases: ABC

Abstract base class for all Queries in the CQRS pattern. Query represent an intention to request the system state. They should be immutable data structures.

Source code in src/castlecraft_engineer/abstractions/query.py
@dataclass(frozen=True)
class Query(abc.ABC):
    """
    Abstract base class for all Queries in the CQRS pattern.
    Query represent an intention to request the system state.
    They should be immutable data structures.
    """