18 releases (4 stable)

✓ Uses Rust 2018 edition

1.0.3 Feb 18, 2020
1.0.2 Dec 29, 2019
0.22.0 Aug 13, 2019
0.21.0 Nov 17, 2018
0.12.1 Mar 1, 2018

#5 in Database implementations

Download history 741/week @ 2019-12-10 6/week @ 2019-12-17 42/week @ 2019-12-24 11/week @ 2019-12-31 245/week @ 2020-01-07 43/week @ 2020-01-14 7/week @ 2020-01-21 3/week @ 2020-01-28 14/week @ 2020-02-04 22/week @ 2020-02-11 101/week @ 2020-02-18 65/week @ 2020-02-25 21/week @ 2020-03-03 20/week @ 2020-03-10 55/week @ 2020-03-17 56/week @ 2020-03-24

396 downloads per month
Used in 2 crates

MPL-2.0 license

145KB
3K SLoC

IndraDB library Docs

This is the IndraDB library. Most users can use the server, which provides higher-level methods for working with IndraDB databases. Linking directly against the library would be necessary if you want to make a new datastore implementation, or if you want to work at a lower-level than the server affords.

Pluggable datastores

IndraDB stores graph data in datastores. Datastores are pluggable: there is built in support for in-memory-only and rocksdb, but you can implement a new custom datastore.

In-Memory

To use the in-memory datastore, add this to your Cargo.toml:

[dependencies.indradb-lib]
git = "https://github.com/indradb/indradb"

RocksDB

To use the rocksdb datastore, add this to your Cargo.toml:

[dependencies.indradb-lib]
git = "https://github.com/indradb/indradb"
features = ["rocksdb-datastore"]

Custom datastores

To implement a custom datastore, you need to implement the Datastore and Transaction traits. See the in-memory datastore for a simpler example implementation. To help you get off the ground faster, there is a standard test suite that can execute against any datastore and check for common bugs and regressions. See the in-memory datastore tests for an implementation of it.

Running tests

Run ./test.sh.

Running benchmarks

Run ./test.sh --bench.

Dependencies

~2.7–6.5MB
~138K SLoC