Providing the union-default-graph query parameter #632
Answered
by
Tpt
JoelBender
asked this question in
Q&A
-
According to the 0.2.4 change log there is a way to provide the |
Beta Was this translation helpful? Give feedback.
Answered by
Tpt
Sep 20, 2023
Replies: 1 comment 1 reply
-
I don't think there is an example with rdflib out there yet. Here it is: from rdflib.plugins.stores.sparqlstore import SPARQLUpdateStore
store = SPARQLUpdateStore(params={'union-default-graph': '', 'using-union-graph': ''}) # using-union-graph is only if you want the union graph for the WHERE part of INSERT/DELETE WHERE updates
store.open(("http://localhost:7878/query", "http://localhost:7878/update"))
store.update("PREFIX ex: <http://example.com/> INSERT DATA { GRAPH ex:g { ex:s ex:p ex:o }}")
print(list(store.query("SELECT * WHERE { ?s ?p ?o }"))) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
JoelBender
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I don't think there is an example with rdflib out there yet. Here it is: