#sparql #sophia #engine #query #über-preliminary

sophia_sparql

An über-preliminary implementation of a SPARQL engine for Sophia

1 unstable release

0.1.0-alpha.0 Nov 15, 2023

#2682 in Database interfaces

28 downloads per month

CECILL-B

35KB
957 lines

An über-preliminary implementation of a SPARQL engine for Sophia

To test it, run:

cargo run --example so_sparql "YOUR SPARQL QUERY HERE" some_data.nq

NB: eventually, this repository should be included in https://github.com/pchampin/sophia_rs


lib.rs:

Example of use:

#
let dataset = SparqlWrapper(&dataset);
let query = SparqlQuery::parse("SELECT ?o { ?s a ?o }")?;
let bindings = dataset.query(&query)?.into_bindings();
for b in bindings {
    let b = b?;
    if let Some(o) = &b[0] {
        println!("found {o}");
    }
}
#

Dependencies

~5–6.5MB
~130K SLoC