def list_events(self, key: Union[str, Tuple[str]], version: int = None, event_type: str = None, start_time: int = None, namespace: str = None): return EventModel.list_events(key, version, event_type, start_time, namespace)
def _sync_event_to_db(self, event: Event, session=None): EventModel.sync_event(event=event, session=session)
def clean_up(self): EventModel.cleanup()
def get_latest_version(self, key: str, namespace: str = None): return EventModel.get_latest_version()
def list_all_events_from_version(self, start_version: int, end_version: int = None): return EventModel.list_all_events_from_version(start_version, end_version)
def list_all_events(self, start_time: int): return EventModel.list_all_events(start_time)
def add_event(self, event: BaseEvent, uuid: str): return EventModel.add_event(event, uuid)
def __init__(self, db_conn=None, create_table_if_not_exists=True): if db_conn is not None: db.SQL_ALCHEMY_CONN = db_conn if create_table_if_not_exists: EventModel.create_table(db.SQL_ALCHEMY_CONN)