1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//! `IndraDB` - a graph datastore.
//!
//! `IndraDB` is broken up into a library and an application. This is the
//! library, which you would use if you want to create new datastore
//! implementations, or plug into the low-level details of `IndraDB`. For most
//! use cases, you can use the application, which exposes an API and scripting
//! layer.

#![cfg_attr(feature = "bench-suite", feature(test))]

#[cfg(feature = "bench-suite")]
extern crate test;

extern crate chrono;
extern crate core;
#[macro_use]
extern crate failure;
#[macro_use]
extern crate lazy_static;
extern crate rand;
extern crate regex;
extern crate serde_json;
extern crate uuid;

#[cfg(feature = "rocksdb-datastore")]
extern crate byteorder;
#[cfg(feature = "rocksdb-datastore")]
extern crate rocksdb;

#[cfg(feature = "sled-datastore")]
extern crate sled;

#[cfg(feature = "test-suite")]
#[macro_use]
pub mod tests;

#[cfg(feature = "bench-suite")]
#[macro_use]
pub mod benches;

mod errors;
mod memory;
mod models;
mod traits;
pub mod util;

pub use crate::errors::*;
pub use crate::memory::{MemoryDatastore, MemoryTransaction};
pub use crate::models::*;
pub use crate::traits::*;

#[cfg(any(feature = "rocksdb-datastore", feature = "sled-datastore"))]
mod bytes;
#[cfg(feature = "rocksdb-datastore")]
mod rdb;
#[cfg(feature = "sled-datastore")]
mod sledds;

#[cfg(feature = "rocksdb-datastore")]
pub use crate::rdb::{RocksdbDatastore, RocksdbTransaction};

#[cfg(feature = "sled-datastore")]
pub use crate::sledds::{SledConfig, SledDatastore, SledTransaction};