From 5fe7b9e0d3bcefeb0a86d81ca1e72837e49dcc24 Mon Sep 17 00:00:00 2001 From: Dustin Whitney Date: Wed, 16 Oct 2019 21:47:08 -0400 Subject: [PATCH] added some docs --- lib/src/repository.rs | 2 +- lib/src/sparql/eval.rs | 1 + lib/src/sparql/mod.rs | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/src/repository.rs b/lib/src/repository.rs index b9f92cf6..2ee0ad10 100644 --- a/lib/src/repository.rs +++ b/lib/src/repository.rs @@ -85,7 +85,7 @@ pub trait RepositoryConnection: Clone { /// ``` fn prepare_query<'a>(&'a self, query: &str, base_iri: Option<&'a str>) -> Result; - + /// This is similar to `prepare_query`, but useful if a SPARQL query has already been parsed, which is the case when building `ServiceHandler`s for federated queries with `SERVICE` clauses. For examples, look in the tests. fn prepare_query_from_pattern<'a>( &'a self, graph_pattern: &'a GraphPattern, diff --git a/lib/src/sparql/eval.rs b/lib/src/sparql/eval.rs index 61dd9e61..989dcb90 100644 --- a/lib/src/sparql/eval.rs +++ b/lib/src/sparql/eval.rs @@ -1662,6 +1662,7 @@ impl<'a, S: StoreConnection + 'a> SimpleEvaluator { ) } + // this is used to encode results froma BindingIterator into an EncodedTuplesIterator. This happens when SERVICE clauses are evaluated fn encode_bindings<'b>( &'b self, variables: &'b [Variable], diff --git a/lib/src/sparql/mod.rs b/lib/src/sparql/mod.rs index 93bc6156..5593b3b7 100644 --- a/lib/src/sparql/mod.rs +++ b/lib/src/sparql/mod.rs @@ -117,6 +117,7 @@ impl<'a, S: StoreConnection + 'a> SimplePreparedQuery { })) } + /// Builds SimplePreparedQuery from an existing `GraphPattern`. This is used to support federated queries via `SERVICE` clauses pub(crate) fn new_from_pattern( connection: S, pattern: &GraphPattern,