Beispiel #1
0
 class APSchedulerSchedule(Model):
     year = columns.Integer(partition_key=True)
     month = columns.Integer(partition_key=True)
     day = columns.Integer(partition_key=True)
     hour = columns.Integer(partition_key=True)
     next_run_time = columns.DateTime(primary_key=True)
     id = columns.UUID(primary_key=True)
     job_state = columns.Blob(required=True)
Beispiel #2
0
 class APSchedulerJobs(Model):
     id = columns.UUID(partition_key=True)
     year = columns.Integer(primary_key=True)
     month = columns.Integer(primary_key=True)
     day = columns.Integer(primary_key=True)
     hour = columns.Integer(primary_key=True)
     next_run_time = columns.DateTime()
     job_state = columns.Blob()
Beispiel #3
0
class StoredEventRecord(Model):
    """Stores integer-sequenced items in Cassandra."""

    __table_name__ = "stored_events"
    _if_not_exists = True

    # Aggregate ID (e.g. an entity or aggregate ID).
    originator_id = columns.UUID(partition_key=True)

    # Aggregate version (index) of item in sequence.
    originator_version = columns.BigInt(clustering_order="DESC", primary_key=True)

    # Topic of the item (e.g. path to domain event class).
    topic = columns.Text(required=True)

    # State of the item (serialized dict, possibly encrypted).
    state = columns.Blob(required=True)
Beispiel #4
0
class SnapshotRecord(Model):
    """Stores snapshots in Cassandra."""

    __table_name__ = "snapshots"
    _if_not_exists = True

    # Sequence ID (e.g. an entity or aggregate ID).
    sequence_id = columns.UUID(partition_key=True)

    # Position (index) of item in sequence.
    position = columns.BigInt(clustering_order="DESC", primary_key=True)

    # Topic of the item (e.g. path to domain entity class).
    topic = columns.Text(required=True)

    # State of the entity (serialized dict, possibly encrypted).
    state = columns.Blob(required=True)
Beispiel #5
0
class TimeuuidSequencedRecord(Model):
    """Stores timeuuid-sequenced items in Cassandra."""

    __table_name__ = "timeuuid_sequenced_items"
    _if_not_exists = True

    # Sequence UUID (e.g. an entity or aggregate ID).
    sequence_id = columns.UUID(partition_key=True)

    # Position (in time) of item in sequence.
    position = columns.TimeUUID(clustering_order="DESC", primary_key=True)

    # Topic of the item (e.g. path to domain event class).
    topic = columns.Text(required=True)

    # State of the item (serialized dict, possibly encrypted).
    state = columns.Blob(required=True)