21 releases

0.0.22 Jan 7, 2022
0.0.21 Dec 22, 2021
0.0.17 Nov 25, 2021
0.0.13 Oct 27, 2021
0.0.2 Jul 29, 2021

#994 in Magic Beans

Download history 159/week @ 2021-09-30 66/week @ 2021-10-07 40/week @ 2021-10-14 100/week @ 2021-10-21 84/week @ 2021-10-28 58/week @ 2021-11-04 89/week @ 2021-11-11 66/week @ 2021-11-18 83/week @ 2021-11-25 128/week @ 2021-12-02 165/week @ 2021-12-09 56/week @ 2021-12-16 36/week @ 2021-12-23 47/week @ 2021-12-30 80/week @ 2022-01-06 77/week @ 2022-01-13

247 downloads per month
Used in 7 crates (3 directly)

Custom license and GPL-3.0-only

2MB
39K SLoC

holochain_state

TODO: write readme about SQLite usage


lib.rs:

Persisted State building blocks

This crate provides a few types for working with databases. The types build upon those found in [holochain_sqlite::buffer].

  • [ElementBuf]: the union of two CasBuffers, one for Entries, one for Headers
  • [ChainSequenceBuf]: database representing the chain sequence DB, which provides a special method for accessing the chain head
  • [SourceChainBuf]: the union of a [ElementBuf] 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 [ElementBuf] 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         ElementBuf          V
      MetadataBuf         |        ChainSequenceBuf
           |              V               |
           |           CasBuf             |
           |              |               |
           V              V               V
        KvvBuf          KvBuf          IntKvBuf

source: https://textik.com/#d7907793784e17e9

Dependencies

~63MB
~1.5M SLoC

,a