-
Notifications
You must be signed in to change notification settings - Fork 32
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
Support INSERT queries #65
Comments
Hi, I've tried to find out why GRLC does not support this; starting from the following error in the log:
It seems to be related to the rdflib Query.parseString calls in the gquery.py file. From the rdflib code, this function only supports read queries (see rdflib). Maybe GRLC should try this one as well, when parsing queries. |
Hi @barrynl , Thanks for posting this. Support for anything other than SELECT has been so far rudimentary, but please check out 53a886c for a basic INSERT implementation. Basically I've followed your advice and used rdflib's UpdateUnit. This comes with two important caveats:
Other than this, SELECT queries are translated into GET and INSERTS into POST in the generated specs, unless otherwise stated. |
Hi @albertmeronyo , Thanks for the effort! Concerning your caveats:
My use case is that I want to let a user fill in the Swagger parameter values (or call the API in some other way) and insert those values into a repository. This, however, is only possible if we add variables inside the INSERT queries, but, as you mentioned, this would make them invalid to the SPARQL 1.1 Update specs. One way to circumvent this, would be to loosen the requirement that the SPARQL queries should be valid BEFORE SUBSTITUTION to the requirement that AFTER SUBSTITUTION the SPARQL queries should be valid. This however, is a deviation from the way GRLC currently works. Regards, Barry |
Another issue with supporting Updates through GRLC is whether users should also generate the unique URIs themselves (which requires a bit of Semantic Web knowledge) or would GRLC do this for them. The longer I think about this issue, the less sure I am that it fits GRLC. Regards, Barry |
It looks like insert via grlc will not be supported, at least not in the near future. Please reopen this issue if needed. |
Hi all,
I'm trying to use GRLC to insert data into a triple database, but the query does not show up in the interface and the GRLC logs show this message:
ParseException: Expected {SelectQuery | ConstructQuery | DescribeQuery | AskQuery}
Apparently, only retrieval of data is supported. Are there any plans for supporting INSERT queries?
Kind regards, Barry
The text was updated successfully, but these errors were encountered: