terminusdb-store

terminusdb-store is a tokio-enabled data store for managing triple data, which consists of a subject, predicate, and an object. The object can be a value or a node that appears in both subject and object positions. This library is designed to be a common base for building databases that handle such triple data, making minimal assumptions about data validity and focusing on efficient storage and retrieval.

Example of Triple Data

cow says value(moo).
duck says value(quack).
cow likes node(duck).
duck hates node(cow).

In cow says value(moo), cow is the subject, says is the predicate, and value(moo) is the object. In cow likes node(duck), cow is the subject, likes is the predicate, and node(duck) is the object.

terminusdb-store enables the storage and efficient searching of such triples, forming the backbone for any database containing triple data.

Features

  • Tokio-enabled: All I/O and locking operations use futures, intended to run on a tokio runtime.
  • Efficient Storage: Optimized for storing a large amount of triple data.
  • Sync Wrapper: A synchronous API wrapper in store::sync embeds its own tokio runtime.

Usage

To use terminusdb-store, add it to your Cargo.toml:

[dependencies]
terminus-store = "0.19.2"

Opening a Store

Create a directory for the store, then open it with:

let store = terminus_store::open_directory_store("/path/to/store").await.unwrap();

Or use the sync wrapper:

let store = terminus_store::open_sync_directory_store("/path/to/store").unwrap();

For more information, visit the documentation on docs.rs.

Examples

See the examples/ directory in the repository for some basic usage examples.

Upgrading from 0.19 or Earlier

Starting with version 0.20.0, terminus-store uses a new storage format that bundles all files into a single archive and supports value types. Stores created using 0.19 or earlier will not work with 0.20 or later. However, there is a conversion tool available: terminusdb-10-to-11.

Roadmap

We are continuously developing terminusdb-store to enhance its capabilities as a high-quality succinct graph representation versioned data storage layer. For more details on our development plans, view our Roadmap.

License

terminus-store is licensed under the Apache 2.0 license.

See Also

Similar Projects