On 08/08/13 00:02, Rob Vesse wrote:
On a related topic I looked at Holger's question around injecting
BNodes into SPARQL updates via ParameterizedSparqlString and it
doesn't work in the scenario he describes (an INSERT WHERE) if the
variable is used both in the INSERT template and WHERE since the
template mention is treated as a minting a fresh BNode. Either he
needs to use the BIND workaround discussed by yourself in another
thread (http://markmail.org/message/3lsnjq7yca4es2wb) which I suspect
is not workable for TQ OR we need to look at restoring initial
bindings for updates.
BIND will work - this is way it works for CONSTRUCT.
All Holger's examples are WHERE based.
I think restoring the feature is going to be the best option, the
documentation just needs to be really clear that initial bindings
only apply to the WHERE portion of updates and not more generally
since that is the only way they were used prior to the feature being
removed (I went back and looked at the ARW 2.9.4 code). We can
always look at expanding their scope later as we've discussed in the
past.
Just to be clear - this is restoring the WHERE based functionality for
update.
I think that is the way forward. I'd like to hear from Stephen about
the implications for streaming but, superficially at least, it does not
look too bad. The initial binding is applied to each DELETE/INSERT/WHERE
(and DELETE WHERE?), when it is evaluated as a query. The streaming is
most critical in the DATA parts.
There is a separate issue about <_:id> and anything reserialized and
sent over the network.
Andy