pub fn query_predicates(query: &str) -> Result<BTreeSet<String>, SparqlError>Expand description
Collect the concrete predicate IRIs a query constrains on — i.e. every
IRI that appears in the predicate position of a triple pattern, or as a plain
predicate inside a property path. Variable predicates (?p) and the special
a (rdf:type) keyword are normalized to their IRI tokens (<…>).
This is what rete federate uses to prune shards: a source whose predicate
set is disjoint from this set cannot contribute a row and can be skipped.
Returns an empty set when the query pins no concrete predicate (e.g. every
pattern uses a variable predicate) — callers should then query every source.