Module store

Source
Expand description

API to access an on-disk RDF dataset.

The entry point of the module is the Store struct.

Usage example:

use oxigraph::model::*;
use oxigraph::sparql::QueryResults;
use oxigraph::store::Store;

let store = Store::new()?;

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

// quad filter
let results: Result<Vec<Quad>, _> = store.quads_for_pattern(None, 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()));
};

Structs§

BulkLoader
A bulk loader allowing to load at lot of data quickly into the store.
CorruptionError
An error return if some content in the database is corrupted.
GraphNameIter
An iterator returning the graph names contained in a Store.
QuadIter
An iterator returning the quads contained in a Store.
Store
An on-disk RDF dataset. Allows to query and update it using SPARQL. It is based on the RocksDB key-value store.
Transaction
An object to do operations during a transaction.

Enums§

LoaderError
An error raised while loading a file into a Store.
SerializerError
An error raised while writing a file from a Store.
StorageError
An error related to storage operations (reads, writes…).