diff options
| author | Gunnar Aastrand Grimnes <gromgull@gmail.com> | 2017-02-02 14:58:52 +0100 |
|---|---|---|
| committer | Gunnar Aastrand Grimnes <gromgull@gmail.com> | 2017-02-02 14:58:52 +0100 |
| commit | edafe0c36186159115b23781a797d9bd02c52835 (patch) | |
| tree | 0b3b434c133a4eae5fdb2c4ed6cbbf5347d2e6fe | |
| parent | 047da0ef1821ed06aa9e02eae4e8483f12242662 (diff) | |
| download | rdflib-edafe0c36186159115b23781a797d9bd02c52835.tar.gz | |
slightly shorter queries for SPARQLUpdateStore
| -rw-r--r-- | rdflib/plugins/stores/sparqlstore.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/rdflib/plugins/stores/sparqlstore.py b/rdflib/plugins/stores/sparqlstore.py index 811fd832..6a9be7fd 100644 --- a/rdflib/plugins/stores/sparqlstore.py +++ b/rdflib/plugins/stores/sparqlstore.py @@ -624,9 +624,7 @@ class SPARQLUpdateStore(SPARQLStore): triple = "%s %s %s ." % (nts(subject), nts(predicate), nts(obj)) if self._is_contextual(context): cid = nts(context.identifier) - q = "DELETE { GRAPH %s { %s } } WHERE { GRAPH %s { %s } }" % ( - cid, triple, - cid, triple) + q = "WITH %(graph)s DELETE { %(triple)s } WHERE { %(triple)s }" % { 'graph': cid, 'triple': triple } else: q = "DELETE { %s } WHERE { %s } " % (triple, triple) self._transaction().append(q) |
