Commit 4e5da0f1 authored by Jürg Billeter's avatar Jürg Billeter Committed by Martyn Russell

SPARQL: Support DELETE WHERE {...}

The DELETE WHERE operation is a short form where the pattern is also
used as the template for deletion. Syntax is specified in current
SPARQL 1.1 Update draft.
parent 6beff0b2
......@@ -656,9 +656,16 @@ public class Tracker.Sparql.Query : Object {
var template_location = get_location ();
if (!data) {
skip_braces ();
// DELETE WHERE is a short form where the pattern is also used as the template for deletion
bool delete_where = accept (SparqlTokenType.WHERE);
if (accept (SparqlTokenType.WHERE)) {
if (delete_where) {
template_location = get_location ();
} else {
skip_braces ();
}
if (delete_where || accept (SparqlTokenType.WHERE)) {
pattern.current_graph = current_graph;
context = pattern.translate_group_graph_pattern (pattern_sql);
pattern.current_graph = null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment