Skip to content

Commit

Permalink
adapts the doc about possible queries to cover the fix for #376
Browse files Browse the repository at this point in the history
  • Loading branch information
hartig committed Jan 16, 2025
1 parent 60e842d commit 366e0d3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/doc/queries.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ <h2>Source Assignments</h2>
<li>The <code>WHERE</code> clause of the query must not contain any other <code>VALUES</code> clause.</li>
</ul>
<p>
Given such a query, HeFQUIN rewrites the query pattern of the query by applying the solution mappings of the <code>VALUES</code> clause to the <code>SERVICE</code> clauses and, then, removing the <code>VALUES</code> clause. If the <code>VALUES</code> clause contains multiple solution mappings, then the group of <code>SERVICE</code> clauses is copied for each of these solution mappings, and the resulting groups are combined via <code>UNION</code>.
Given such a query, HeFQUIN rewrites the query pattern of the query by applying the solution mappings of the <code>VALUES</code> clause to the <code>SERVICE</code> clauses and, then, removing the <code>VALUES</code> clause. If the <code>VALUES</code> clause contains multiple solution mappings, then the group of <code>SERVICE</code> clauses is copied for each of these solution mappings, and the resulting groups are combined via <code>UNION</code>. Additionally, in any of the two cases (just one solution mapping in the <code>VALUES</code> clause or multiple), <code>BIND</code> clauses are added to still capture the bindings for the variables of the <code>VALUES</code> clause.
</p>
<p>
As an example, consider the following query.
Expand All @@ -105,11 +105,15 @@ <h2>Source Assignments</h2>
{
SERVICE ex:endpoint1 { .. some pattern (that neither mentions ?s1 nor ?s2) .. }
SERVICE ex:endpoint2 { .. also some pattern (that also doesn't mention ?s1 or ?s2) .. }
BIND (?s1 AS ex:endpoint1)
BIND (?s2 AS ex:endpoint2)
}
UNION
{
SERVICE ex:endpoint1 { .. some pattern (that neither mentions ?s1 nor ?s2) .. }
SERVICE ex:endpoint3 { .. also some pattern (that also doesn't mention ?s1 or ?s2) .. }
BIND (?s1 AS ex:endpoint1)
BIND (?s2 AS ex:endpoint3)
}
}</code></pre>

Expand Down

0 comments on commit 366e0d3

Please sign in to comment.