9 releases

0.2.5 Jul 11, 2021
0.2.4 Apr 28, 2021
0.2.2 Mar 18, 2021
0.2.1 Jan 16, 2021
0.1.1 Aug 14, 2020

#21 in Database implementations

Download history 30/week @ 2021-05-31 55/week @ 2021-06-07 27/week @ 2021-06-14 33/week @ 2021-06-21 33/week @ 2021-06-28 41/week @ 2021-07-05 44/week @ 2021-07-12 47/week @ 2021-07-19 50/week @ 2021-07-26 58/week @ 2021-08-02 29/week @ 2021-08-09 21/week @ 2021-08-16 11/week @ 2021-08-23 2/week @ 2021-08-30 9/week @ 2021-09-06 10/week @ 2021-09-13

213 downloads per month
Used in 3 crates

MIT/Apache

1MB
25K SLoC

Oxigraph

Latest Version Released API docs Crates.io downloads actions status Gitter

Oxigraph is a graph database library implementing the SPARQL standard.

Its goal is to provide a compliant, safe and fast graph database. It also provides a set of utility functions for reading, writing, and processing RDF files.

It currently provides three store implementations providing SPARQL capability:

  • MemoryStore: a simple in memory implementation.
  • RocksDbStore: a file system implementation based on the RocksDB key-value store. It requires the "rocksdb" feature to be activated. The clang compiler needs to be installed to compile RocksDB.
  • SledStore: another file system implementation based on the Sled key-value store. It requires the "sled" feature to be activated. Sled is much faster to build than RockDB and does not require a C++ compiler. However, Sled is still in development, less tested and data load seems much slower than RocksDB.

Oxigraph is in heavy development and SPARQL query evaluation has not been optimized yet.

The disabled by default "sophia" feature provides sophia_api traits implementation on Oxigraph terms and stores.

Oxigraph also provides a standalone HTTP server and a Python library based on this library.

Oxigraph implements the following specifications:

A preliminary benchmark is provided.

Usage example with the MemoryStore:

use oxigraph::MemoryStore;
use oxigraph::model::*;
use oxigraph::sparql::QueryResults;

let store = MemoryStore::new();

// insertion
let ex = NamedNode::new("http://example.com")?;
let quad = Quad::new(ex.clone(), ex.clone(), ex.clone(), None);
store.insert(quad.clone());

// quad filter
let results: Vec<Quad> = store.quads_for_pattern(Some(ex.as_ref().into()), None, None, None).collect();
assert_eq!(vec![quad], results);

// SPARQL query
if let QueryResults::Solutions(mut solutions) =  store.query("SELECT ?s WHERE { ?s ?p ?o }")? {
    assert_eq!(solutions.next().unwrap()?.get("s"), Some(&ex.into()));
}

License

This project is licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Futures by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~5–11MB
~228K SLoC