On 30/07/14 16:10, Rob Walpole wrote:
Hi Andy,


What's the problem with using WITH?


The problem is that we are want to switch our default dataset from one
using a single unnamed graph as the default graph to one using two named
graphs as the default graph. We have figured out how to do the data part of
the switch but we already have a lot of SPARQL update queries in various
places which we wanted to avoid having to modify.

I'd bite the bullet and change them -- it's style thing but hacking the protocol to effectively modify operation makes for long-term confusion where someone maintaining one of those updates isn't aware of the layer that modifies the operation via the protocol.

Doing updates really does presume knowing the physical dataset. Your updates using USING were successfully changing the (empty!) default graph.

I was hoping that the
using-named-graph-uri query parameter would just do this - but I understand
from your explanation and re-reading the spec that it only affects the
WHERE clause. This seems slightly odd as the spec implies to me it is an
alternative to WITH...

"""
The RDF Dataset for an update operation may be specified either in the
operation string itself using the USING,USING NAMED, and/or WITH keywords,
or it may be specified via the using-graph-uri and using-named-graph-uri
  parameters.

"""

..but I guess it just cannot be used with a WITH.

USING etc behaves like FROM -- in TDB, that means pick out of the dataset but in a different implementation it may be pick off the web. WITH always picks from the dataset -- it is syntactic sugar for teh 2*GRAPH form.

WITH is a different mechanism - it does specify a dataset for the update, one where the default graph is different for both access (WHERE) and change (DELETE, INSERT).

But WITH is not a form of USING - each has it's own use and they are different.

What's sort of missing is a protocol argument "with-graph-uri".

        Andy



Cheers
Rob


Reply via email to