How to use the eventsourcing.application.policies.PersistencePolicy function in eventsourcing

To help you get started, we’ve selected a few eventsourcing examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github johnbywater / eventsourcing / eventsourcing / application / base.py View on Github external
def construct_entity_persistence_policy(self):
        if self.entity_event_store:
            return PersistencePolicy(
                event_store=self.entity_event_store,
                event_type=VersionedEntity.Event,
            )
github johnbywater / eventsourcing / eventsourcing / application / simple.py View on Github external
def construct_persistence_policy(self) -> None:
        self._persistence_policy = PersistencePolicy(
            event_store=self.event_store, persist_event_type=self.persist_event_type
        )
github johnbywater / eventsourcing / eventsourcing / application / base.py View on Github external
def construct_snapshot_persistence_policy(self):
        if self.snapshot_event_store:
            return PersistencePolicy(
                event_store=self.snapshot_event_store,
                event_type=Snapshot,
            )
github johnbywater / eventsourcing / eventsourcing / application / base.py View on Github external
def construct_log_persistence_policy(self):
        if self.log_event_store:
            return PersistencePolicy(
                event_store=self.log_event_store,
                event_type=Logged,
            )
github johnbywater / eventsourcing / eventsourcing / example / application.py View on Github external
def construct_snapshot_persistence_policy(self):
        if self.snapshot_event_store:
            return PersistencePolicy(
                event_store=self.snapshot_event_store, persist_event_type=Snapshot
            )
github johnbywater / eventsourcing / eventsourcing / example / application.py View on Github external
def construct_entity_persistence_policy(self):
        if self.entity_event_store:
            return PersistencePolicy(
                event_store=self.entity_event_store,
                persist_event_type=VersionedEntity.Event,
            )