ValueProgram¶
- class dsviper.ValueProgram¶
Bases:
objectThe sequence of opcodes a commit carries.
Accumulated by CommitMutableState as mutations are applied, and decoded back when the commit is read. all_opcodes() returns the whole sequence; opcodes() and document_set_keys() index it by key and by attachment.
Note: Not directly instantiable.
- all_opcodes() list[ValueOpcode]¶
Return the list of all opcodes.
- document_set_keys(attachment_runtime_id: ValueUUId) set[ValueOpcodeKey]¶
Return the set of ValueOpcodeKey of type ‘Document_Set’ associated with the attachment_runtime_id.
- has_document_set(opcode_key: ValueOpcodeKey) bool¶
Return True if an opcode ‘Document_Set’ is associated with the opcode_key.
- opcodes(attachment_runtime_id: ValueUUId, key: ValueKey) list[ValueOpcode]¶
Return the list of opcodes applying to key under attachment_runtime_id.
key is the instance’s ValueKey, not a ValueOpcodeKey: the two arguments together make the ValueOpcodeKey the program is indexed by.