222 releases

new 0.5.0-dev.10 Dec 18, 2024
0.5.0-dev.7 Nov 27, 2024
0.4.0 Dec 17, 2024
0.4.0-dev.15 Jul 31, 2024
0.0.2 Jul 29, 2021

#164 in Magic Beans

Download history 276/week @ 2024-08-26 331/week @ 2024-09-02 516/week @ 2024-09-09 854/week @ 2024-09-16 860/week @ 2024-09-23 597/week @ 2024-09-30 393/week @ 2024-10-07 731/week @ 2024-10-14 284/week @ 2024-10-21 341/week @ 2024-10-28 464/week @ 2024-11-04 330/week @ 2024-11-11 484/week @ 2024-11-18 598/week @ 2024-11-25 449/week @ 2024-12-02 533/week @ 2024-12-09

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

Apache-2.0 and AGPL-3.0 WITH mif-exception

2.5MB
51K 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

~75–110MB
~2M SLoC