terminus_store/
lib.rs

1#![type_length_limit = "10628160"]
2
3//! Tokio-enabled data store for triple data
4//!
5//! This library implements a way to store triple data - data that
6//! consists of a subject, predicate and an object, where object can
7//! either be some value, or a node (a string that can appear both in
8//! subject and object position).
9//!
10//! This library is intended as a common base for anyone who wishes to
11//! build a database containing triple data. It makes very few
12//! assumptions on what valid data is, only focusing on the actual
13//! storage aspect.
14//!
15//! This library is tokio-enabled. Any i/o and locking happens through
16//! futures, and as a result, many of the functions in this library
17//! return futures. These futures are intended to run on a tokio
18//! runtime, and many of them will fail outside of one. If you do not
19//! wish to use tokio, there's a small sync wrapper in `store::sync`
20//! which embeds its own tokio runtime, exposing a purely synchronous
21//! API.
22//!
23//! Most users will probably only need to use the types and functions
24//! in the `store` module (or `store::sync` for the synchronous
25//! version). This module provides a high-level API which should be
26//! sufficient for creating and querying databases.
27//!
28//! The `structure`, `layer`, and `storage` module expose the inner
29//! workings of terminus-store. They are useful for implementing new
30//! storage backends, or writing analysis and recovery tools.
31#[macro_use]
32extern crate lazy_static;
33
34pub mod layer;
35#[macro_use]
36pub(crate) mod logging;
37pub mod storage;
38pub mod store;
39
40pub use layer::{IdTriple, Layer, ObjectType, ValueTriple};
41pub use store::sync::{open_sync_archive_store, open_sync_directory_store, open_sync_memory_store};
42pub use store::{open_archive_store, open_directory_store, open_memory_store};