Oxigraph
Oxigraph is a graph database library implementing the SPARQL standard.
Its goal is to provide a compliant, safe and fast on-disk graph database. It also provides a set of utility functions for reading, writing, and processing RDF files.
Oxigraph is in heavy development and SPARQL query evaluation has not been optimized yet.
Oxigraph also provides a CLI tool and a Python library based on this library.
Oxigraph implements the following specifications:
- SPARQL 1.1 Query, SPARQL 1.1 Update, and SPARQL 1.1 Federated Query.
- Turtle, TriG, N-Triples, N-Quads, and RDF/XML RDF serialization formats for both data ingestion and retrieval.
- SPARQL Query Results XML Format, SPARQL 1.1 Query Results JSON Format and SPARQL 1.1 Query Results CSV and TSV Formats.
A preliminary benchmark is provided. Oxigraph internal design is described on the wiki.
The main entry point of Oxigraph is the Store struct:
use Store;
use *;
use QueryResults;
let store = new.unwrap;
// insertion
let ex = new.unwrap;
let quad = new;
store.insert.unwrap;
// quad filter
let results = store.quads_for_pattern..unwrap;
assert_eq!;
// SPARQL query
if let Solutions = store.query.unwrap
It is based on these crates that can be used separately:
oxrdf, datastructures encoding RDF basic concepts (theoxigraph::modelmodule).oxrdfio, a unified parser and serializer API for RDF formats (theoxigraph::iomodule). It itself relies on:spargebra, a SPARQL parser.sparesults, parsers and serializers for SPARQL result formats (theoxigraph::sparql::resultsmodule).sparopt, a SPARQL optimizer.oxsdatatypes, an implementation of some XML Schema datatypes.
To build the library locally, don't forget to clone the submodules using git clone --recursive https://github.com/oxigraph/oxigraph.git to clone the repository including submodules or git submodule update --init to add submodules to the already cloned repository.
It is possible to disable the RocksDB storage backend to only use the in-memory fallback by disabling the rocksdb default feature:
= { = "*", = false }
This is the default behavior when compiling Oxigraph to WASM.
License
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or
<http://www.apache.org/licenses/LICENSE-2.0>) - MIT license (LICENSE-MIT or
<http://opensource.org/licenses/MIT>)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Oxigraph by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.