AttachmentMutating¶
- class dsviper.AttachmentMutating¶
Bases:
objectAn interface used to express fine-grained mutations of a value.
Note: Not directly instantiable.
- attachment(attachment_runtime_id: ValueUUId) Attachment¶
Return the attachment or raise.
- definitions() DefinitionsConst¶
Return the definition.
- diff(attachment: Attachment, key: ValueKey, value: _InputValues, *, recursive: bool = False) None¶
Applies the mutation opcodes from the calculation of the difference between the value passed in parameter and the current value in the state. If recursive is True, the difference is recursively computed by structure’s field.
- enumerate(attachment: Attachment, *, encoded: bool = True) list[tuple[ValueKey, _OutputValues]]¶
Return the list (key, document).
- get(attachment: Attachment, key: ValueKey) ValueOptional¶
Return an optional<document_type> associated with the key.
- has(attachment: Attachment, key: ValueKey) bool¶
Return True if a document is associated with the key.
- insert_in_xarray(attachment: Attachment, key: ValueKey, path: PathConst, before_position: ValueUUId, new_position: ValueUUId, value: _InputValues) None¶
Insert a value by creating a new_position before before_position.
- keys(attachment: Attachment) ValueSet¶
Return all keys.
- remove_in_xarray(attachment: Attachment, key: ValueKey, path: PathConst, position: ValueUUId) None¶
Remove the position.
- set(attachment: Attachment, key: ValueKey, value: _InputValues) None¶
Associate the document with the key.
- subtract_in_map(attachment: Attachment, key: ValueKey, path: PathConst, value: _InputValues) None¶
Form the subtraction between the map located at path in the document associated with the key and the value.
- subtract_in_set(attachment: Attachment, key: ValueKey, path: PathConst, value: _InputValues) None¶
Form the subtraction between the set at path in the document associated with the key and the value.
- union_in_map(attachment: Attachment, key: ValueKey, path: PathConst, value: _InputValues) None¶
Form the union between the map located at path in the document associated with the key and the value.
- union_in_set(attachment: Attachment, key: ValueKey, path: PathConst, value: _InputValues) None¶
Form the union between the set at path in the document associated with key and the value.
- update(attachment: Attachment, key: ValueKey, path: PathConst, value: _InputValues) None¶
Update the value located at path in the document associated with the key.
- update_in_map(attachment: Attachment, key: ValueKey, path: PathConst, value: _InputValues) None¶
Form the subtraction between the map located at path in the document associated with the key and the value.
- update_in_xarray(attachment: Attachment, key: ValueKey, path: PathConst, position: ValueUUId, value: _InputValues) None¶
Update the value at position.