- From: Steve Harris <steve.harris@garlik.com>
- Date: Mon, 23 Nov 2009 18:17:59 +0000
- To: Paul Gearon <gearon@ieee.org>
- Cc: Lee Feigenbaum <lee@thefigtrees.net>, SPARQL Working Group <public-rdf-dawg@w3.org>
On 23 Nov 2009, at 16:11, Paul Gearon wrote:
>> Another thing we could discuss is FROM v's GRAPH syntax in Update, eg
>>
>> 1) DELETE FROM <uri> { ?x ?y ?z } WHERE { GRAPH <uri> { ?x ?y ?z } }
>> and
>> 2) DELETE { GRAPH <uri> { ?x ?y ?z } } WHERE { GRAPH <uri> { ?x ?y ?
>> z } }
>>
>> (potentially same as DELETE WHERE { GRAPH <uri> { ?x ?y ?z } })
>>
>> FWIW, I prefer the 2) form, I find it clearer.
>
> I don't see technical merits of one over the other (unless I'm missing
> something), so it can go either way.
>
> I like the structure of (1) more, as it is closer to the syntax of
> existing forms. However, (2) is structured a little more consistently,
> so I see the appeal there. Since I prefer consistency across the board
> over style, then I'm leaning towards (1).
The main problem with (1) is that it can be misleading (to me at least):
DELETE {
?x ?y ?z
}
WHERE {
GRAPH <G> { ?x ?y ?z }
}
Removes the contents of G from the default graph, not from G.
The GRAPH form makes the proposed shorthand notation for DELETEs
easier to use:
DELETE WHERE { GRAPH <g1> { ?x ?y ?z } GRAPH <g2> { ?x ?y ?z } }
The FROM syntax prevents you from doing operations such as:
DELETE WHERE {
GRAPH ?g { ?x a <Foo> }
}
Which is pretty unfortunate if you work with named graphs.
- Steve
--
Steve Harris, CTO, Garlik Limited
2 Sheen Road, Richmond, TW9 1AE, UK
+44(0)20 8973 2465 http://www.garlik.com/
Registered in England and Wales 535 7233 VAT # 849 0517 11
Registered office: Thames House, Portsmouth Road, Esher, Surrey, KT10
9AD
Received on Monday, 23 November 2009 18:18:35 UTC