Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[question] Update appears to succeed, but no data on select #252

Closed
retog opened this issue Oct 28, 2019 · 4 comments
Closed

[question] Update appears to succeed, but no data on select #252

retog opened this issue Oct 28, 2019 · 4 comments

Comments

@retog
Copy link

retog commented Oct 28, 2019

Hi,

I just wanted to give QuitStore a try and started it using just defaults with docker run -it -p 8080:8080 aksw/quitstore.

Sending an update statements yields to a rassuring response code:

$ curl -D - 'http://localhost:8080/sparql' -H 'Accept: text/plain,*/*;q=0.9' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' --data 'update=PREFIX+dc%3A+%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%3E%0AINSERT+DATA%0A%7B+%0A++%3Chttp%3A%2F%2Fexample%2Fbook1%3E+dc%3Atitle+%22A+new+book%22+%3B%0A+++++++++++++++++++++++++dc%3Acreator+%22A.N.Other%22+.%0A%7D'
HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Content-Length: 0
X-CurrentBranch: master
X-CurrentCommit: e6199a32292a5837c73d00feef33041d8899bc13
Access-Control-Allow-Origin: *

However no data appears in the git repository in /data in the container and no data is returned by a select query:

$ curl 'http://localhost:8080/sparql' --data 'query=SELECT+*+WHERE+%7B%0A++%3Fsub+%3Fpred+%3Fobj+.%0A+%7D%0A%0ALIMIT+10'
<?xml version="1.0" encoding="utf-8"?>
<sparql xmlns="http://www.w3.org/2005/sparql-results#" xmlns:xml="http://www.w3.org/XML/1998/namespace"><head><variable name="obj"></variable><variable name="pred"></variable><variable name="sub"></variable></head><results></results></sparql>

I'm probably missing something obvious, but I would be extremly grateful if you could point me to it.

@white-gecko white-gecko changed the title [question] Upadte appears to succeed, but no data on select [question] Update appears to succeed, but no data on select Oct 28, 2019
@white-gecko
Copy link
Member

Hello @retog,
thanks for giving it a try. The Quit Store currently only supports inserts to named graphs. We are somehow undecided, how to deal with the default graph. Due to some issue in the python rdflib (RDFLib/rdflib#811) we also cant query the default graph as union of all named graphs.

If you execute something like

PREFIX dc: <http://purl.org/dc/elements/1.1/>
INSERT DATA
{
  GRAPH <http://example.org/> {
    <http://example/book1> dc:title "A+new+book";
                  dc:creator "A.N.Other".
  }
}

and query

SELECT * {
  GRAPH ?g {
    ?s ?p ?o
  }
}

that should work

@retog
Copy link
Author

retog commented Oct 28, 2019

It works! Thanks.

But the impossibility of union-default-graph is indeed a bummer.

@retog retog closed this as completed Oct 28, 2019
@retog
Copy link
Author

retog commented Oct 28, 2019

Well maybe you could improve the response code to the update to something like: "400 Default graph not supported"

@white-gecko
Copy link
Member

Yes that sounds good I've added a comment to #30

Regarding the union to query we also have an issue: #234

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants