157 releases

new 0.3.0-beta-dev.41 Mar 27, 2024
0.3.0-beta-dev.36 Feb 28, 2024
0.3.0-beta-dev.28 Dec 22, 2023
0.3.0-beta-dev.25 Nov 29, 2023
0.0.2 Jul 29, 2021

#1961 in Magic Beans

Download history 121/week @ 2023-12-05 145/week @ 2023-12-12 58/week @ 2023-12-19 7/week @ 2023-12-26 28/week @ 2024-01-02 132/week @ 2024-01-09 119/week @ 2024-01-16 128/week @ 2024-01-23 181/week @ 2024-01-30 368/week @ 2024-02-06 140/week @ 2024-02-13 205/week @ 2024-02-20 549/week @ 2024-02-27 636/week @ 2024-03-05 433/week @ 2024-03-12 644/week @ 2024-03-19

2,312 downloads per month
Used in 16 crates (4 directly)

Apache-2.0 and AGPL-3.0 WITH mif-exception

2.5MB
54K 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.

License

License: CAL 1.0

Copyright (C) 2019 - 2024, Holochain Foundation

This program is free software: you can redistribute it and/or modify it under the terms of the license provided in the LICENSE file (CAL-1.0). This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Dependencies

~99MB
~2M SLoC