CommitData

class dsviper.CommitData

Bases: object

One commit’s encoded opcodes, with the header that places it.

What one database hands another when they synchronize. opcodes() decodes them against definitions; sort() puts a list of them in topological order.

Note: Not directly instantiable.

blob_ids(stream_codec_instancing: StreamCodecInstancing, definitions: DefinitionsConst) → set[ValueBlobId]

Return the blob_id set the opcodes reference, decoding them with stream_codec_instancing against definitions.

data() → ValueBlob

Return the blob of the encoded opcodes.

header() → CommitHeader

Return the CommitHeader - the label, type, parent and timestamp.

opcodes(stream_codec_instancing: StreamCodecInstancing, definitions: DefinitionsConst) → list[ValueOpcode]

Return the opcodes, decoded with stream_codec_instancing against definitions.

static sort(commit_datas: list[CommitData]) → list[CommitData]

Return the list of CommitData, topologically sorted.