|
|
5 years ago | |
|---|---|---|
| .. | ||
| benches | 5 years ago | |
| src | 5 years ago | |
| tests | 5 years ago | |
| Cargo.toml | 5 years ago | |
| README.md | 5 years ago | |
README.md
Oxigraph
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.SledStore: a file system implementation based on the Sled key-value store. It requires the"sled"feature to be activated.
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:
- 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 using the Rio library.
- 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.
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
- 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 Futures by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.