#holochain #temp-dir #state #read #blockchain

holochain_state

Holochain persisted state datatypes and functions

247 releases

new 0.6.0-dev.0 Apr 16, 2025
0.5.0-dev.21 Mar 3, 2025
0.5.0-dev.11 Dec 25, 2024
0.5.0-dev.7 Nov 27, 2024
0.0.2 Jul 29, 2021

#118 in Magic Beans

Download history 129/week @ 2024-12-27 145/week @ 2025-01-03 327/week @ 2025-01-10 345/week @ 2025-01-17 384/week @ 2025-01-24 382/week @ 2025-01-31 443/week @ 2025-02-07 381/week @ 2025-02-14 264/week @ 2025-02-21 581/week @ 2025-02-28 278/week @ 2025-03-07 186/week @ 2025-03-14 185/week @ 2025-03-21 234/week @ 2025-03-28 580/week @ 2025-04-04 378/week @ 2025-04-11

1,401 downloads per month
Used in 11 crates (2 directly)

Apache-2.0

1.5MB
30K SLoC

holochain_state

Project Forum Chat

Twitter Follow

Crate API Docs

The Holochain state crate provides helpers and abstractions for working with the holochain_sqlite crate.

Reads

The main abstraction for creating data read queries is the Query trait. This can be implemented to make constructing complex queries easier.

The source_chain module provides the SourceChain type, which is the abstraction for working with chains of actions.

The host_fn_workspace module provides abstractions for reading data during workflows.

Writes

The mutations module is the complete set of functions for writing data to sqlite in holochain.

In-memory

The scratch module provides the Scratch type for reading and writing data in memory that is not visible anywhere else.

The SourceChain type uses the Scratch for in-memory operations which can be flushed to the database.

The Query trait allows combining arbitrary database SQL queries with the scratch space so reads can union across the database and in-memory data.

Dependencies

~79MB
~1.5M SLoC