Changeset View
Changeset View
Standalone View
Standalone View
swh/storage/cassandra/model.py
Show First 20 Lines • Show All 108 Lines • ▼ Show 20 Lines | |||||
@dataclasses.dataclass | @dataclasses.dataclass | ||||
class DirectoryRow(BaseRow): | class DirectoryRow(BaseRow): | ||||
TABLE = "directory" | TABLE = "directory" | ||||
PARTITION_KEY = ("id",) | PARTITION_KEY = ("id",) | ||||
id: bytes | id: bytes | ||||
raw_manifest: Optional[bytes] | |||||
@dataclasses.dataclass | @dataclasses.dataclass | ||||
class DirectoryEntryRow(BaseRow): | class DirectoryEntryRow(BaseRow): | ||||
TABLE = "directory_entry" | TABLE = "directory_entry" | ||||
PARTITION_KEY = ("directory_id",) | PARTITION_KEY = ("directory_id",) | ||||
CLUSTERING_KEY = ("name",) | CLUSTERING_KEY = ("name",) | ||||
Show All 15 Lines | class RevisionRow(BaseRow): | ||||
type: str | type: str | ||||
directory: bytes | directory: bytes | ||||
message: bytes | message: bytes | ||||
author: Person | author: Person | ||||
committer: Person | committer: Person | ||||
synthetic: bool | synthetic: bool | ||||
metadata: str | metadata: str | ||||
extra_headers: dict | extra_headers: dict | ||||
raw_manifest: Optional[bytes] | |||||
@dataclasses.dataclass | @dataclasses.dataclass | ||||
class RevisionParentRow(BaseRow): | class RevisionParentRow(BaseRow): | ||||
TABLE = "revision_parent" | TABLE = "revision_parent" | ||||
PARTITION_KEY = ("id",) | PARTITION_KEY = ("id",) | ||||
CLUSTERING_KEY = ("parent_rank",) | CLUSTERING_KEY = ("parent_rank",) | ||||
Show All 10 Lines | class ReleaseRow(BaseRow): | ||||
id: bytes | id: bytes | ||||
target_type: str | target_type: str | ||||
target: bytes | target: bytes | ||||
date: TimestampWithTimezone | date: TimestampWithTimezone | ||||
name: bytes | name: bytes | ||||
message: bytes | message: bytes | ||||
author: Person | author: Person | ||||
synthetic: bool | synthetic: bool | ||||
raw_manifest: Optional[bytes] | |||||
@dataclasses.dataclass | @dataclasses.dataclass | ||||
class SnapshotRow(BaseRow): | class SnapshotRow(BaseRow): | ||||
TABLE = "snapshot" | TABLE = "snapshot" | ||||
PARTITION_KEY = ("id",) | PARTITION_KEY = ("id",) | ||||
id: bytes | id: bytes | ||||
▲ Show 20 Lines • Show All 153 Lines • Show Last 20 Lines |