On 29/09/15 18:09, Zen 98052 wrote:
Thanks Andy! I change the command to this and it works:

DELETE WHERE
{
  ?s ?p ?o
}

Follow up question, right now I subclass Jena's DatasetGraphBase class, and 
override the delete method, i.e.:

     @Override
     public void delete(Quad quad) {
         // call our lib to delete that specific quad from back-end store
     }

Follow up question below...
I see this can become performance issue when there are many rows
involved like in this case
I see I can override deleteAny method, and create iterator and
handle
the batch myself, like the template code in DatasetGraphBase.java
But it looks like deleteAny method is only called from CLEAR
command. Is it possible to implement batch deletion for DELETE WHERE
command? Or is there a better way doing this from Jena?

There isn't a batching system builtin - it's the responsibility of the implementation. Your system can do that batching - for example, catch all (or upto some limit) deletes and flush if a non-delete is called. An optional framework would be good (contributions welcome).

The right way to batch together is often dependent on the system and different systems want different batching, hence framework not built-in. That may be simply the size of batch (the size is a feature of the underlying system as are the resources) but also whether the batch is driven from the incoming update stream or driven by the underling storage or other operations in progress.

        Andy

Reply via email to