#holochain #persistence #cas #eav #content-addressable #pickledb-rs

nightly holochain_persistence_pickle

persistence for content addressable storage and entity attribute value indexes backed by pickledb-rs

23 releases

0.0.18 Mar 10, 2020
0.0.17 Feb 13, 2020
0.0.13 Jan 17, 2020
0.0.11 Nov 11, 2019
0.0.1-alpha6 Jun 19, 2019

#4 in #eav


Used in holochain_conductor_lib

Apache-2.0

110KB
2.5K SLoC

holochain_persistence_pickle

Project Chat

Twitter Follow

License: Apache-2.0

Overview

pickledb persistence implementation for holochain. Provides content addressable storage (CAS) and entity attribute value (index) using pickledb's key/value store.

Usage

Add holochain_persistence_pickle crate to your Cargo.toml. Below is a stub for creating a storage unit and adding some content.

use holochain_persistence_file::cas::pickle::PickleStorage;
use tempfile::tempdir;

pub fn init() -> PickleStorage {
  let dir = tempdir().expect("Could not create a tempdir for CAS.");
  let store = PickleStorage::new(dir.path()).unwrap();
  store.add(<some_content>).expect("added some content");
  store
}

Contribute

Holochain is an open source project. We welcome all sorts of participation and are actively working on increasing surface area to accept it. Please see our contributing guidelines for our general practices and protocols on participating in the community.

License

License: Apache-2.0

Copyright (C) 2019, Holochain Foundation

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Dependencies

~14MB
~279K SLoC