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§
- Bulk
Loader - A bulk loader allowing to load at lot of data quickly into the store.
- Corruption
Error - An error return if some content in the database is corrupted.
- Graph
Name Iter - An iterator returning the graph names contained in a
Store
. - Quad
Iter - 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§
- Loader
Error - An error raised while loading a file into a
Store
. - Serializer
Error - An error raised while writing a file from a
Store
. - Storage
Error - An error related to storage operations (reads, writes…).