spargebra

Crates.iospargebra
lib.rsspargebra
version0.4.0-beta.3
created_at2021-07-30 19:41:53.698885+00
updated_at2025-08-23 19:14:18.364042+00
descriptionSPARQL parser
homepage
repositoryhttps://github.com/oxigraph/oxigraph/tree/main/lib/spargebra
max_upload_size
id429401
size227,348
Thomas Tanon (Tpt)

documentation

https://docs.rs/spargebra

README

Spargebra

Latest Version Released API docs Crates.io downloads actions status Gitter

Spargebra is a SPARQL parser.

It supports both SPARQL 1.1 Query and SPARQL 1.1 Update.

The emitted tree is based on SPARQL 1.1 Query Algebra objects.

The API entry point for SPARQL queries is the [Query] struct and the API entry point for SPARQL updates is the [Update] struct.

Support for SPARQL 1.2 is also available behind the sparql-12 feature.

This crate is intended to be a building piece for SPARQL implementations in Rust like Oxigraph.

Usage example:

use spargebra::SparqlParser;

let query_str = "SELECT ?s ?p ?o WHERE { ?s ?p ?o . }";
let query = SparqlParser::new().parse_query(query_str).unwrap();
assert_eq!(query.to_string(), query_str);

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.

Commit count: 2075

cargo fmt