Expand description
Common traits for working with SPARQL.
§Design rationale
These traits are deliberately very generic. Specific implementations may have additional features, such as:
- setting default values for
BASE,PREFIX,FROM,FROM NAMEDdirectives, before parsing query string, or - pre-binding variables before evaluating query;
- etc…
However, we do not want to impose these feature, or any subset thereof, to all implementations of Sophia.
§Extension point
A possible way to extend these traits with additional functionalities
(such as the ones described above)
would be to define subtraits of Query with additional methods
(e.g.set_base, bind_variables…).
Implementation could then express requirements as trait bound, e.g.:
D: SparqlDataset,
D::Query: Clone + BindVariable,Sophia may define such traits in the future.
Enums§
- Sparql
Result - The result of executing a SPARQL query.
Traits§
- Into
Query - A utility trait to allow
SparqlDataset::queryto accept either&strorSelf::Query. - Query
- Preprocessed query, ready for execution.
- Sparql
Bindings - The result of executing a SPARQL SELECT query
- Sparql
Dataset - A dataset that can be queried with SPARQL.