Crate holochain_state
source · [−]Expand description
@todo: update diagram and types
Persisted State building blocks
This crate provides a few types for working with databases. The types build upon those found in holochain_sqlite::buffer.
- RecordBuf the union of two CasBuffers, one for Entries, one for Actions
- ChainSequenceBuf: database representing the chain sequence DB, which provides a special method for accessing the chain head
- SourceChainBuf: the union of a RecordBuf and a ChainSequenceBuf, which fully represents a source chain
- MetadataBuf: (unimplemented) Uses a KvvBuffer to represent EAV-like relationships between CAS entries
- Cascade: (unimplemented) Unifies two RecordBuf and two MetadataBuf references (one of each is a cache) in order to perform the complex metadata-aware queries for getting entries and links, including CRUD resolution
The follow diagram shows the composition hierarchy. The arrows mean “contains at least one of”.
Cascade SourceChain
| |
| V
| SourceChainBuf
| |
| |
+----------+ +-----+------+
| | | |
| V V |
V RecordBuf V
MetadataBuf | ChainSequenceBuf
| V |
| CasBuf |
| | |
V V V
KvvBuf KvBuf IntKvBuf
source: https://textik.com/#d7907793784e17e9
Modules
Helpers for unit tests
Validation Database Types
Module for items related to aggregating validation_receipts
Workspaces are a simple abstraction used to stage changes during Workflow execution to be persisted later
Macros
Produce file and line number info at compile-time