-
Notifications
You must be signed in to change notification settings - Fork 10
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
Handle SPARQL* queries #69
Conversation
Ah yes, this depends on DefinitelyTyped/DefinitelyTyped#46847, so can not be merged yet. |
bin/sparqlalgebrajs.ts
Outdated
console.log(JSON.stringify(Util.objectify(translate(args._[0], { quads: args.q, sparqlStar: true })), null, 2)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a use case for users who might not want this option? In that case we should make it an option that can be chosen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I followed the same reasoning as SPARQL.js to enable it by default on the CLI.
We maybe could add a --strict
flag to disable it?
https://github.com/RubenVerborgh/SPARQL.js/#standalone
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds good. It should probably also be added in the if-call above right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes, missed that one.
console.log(JSON.stringify(Util.objectify(translate(args._[0], { quads: args.q, sparqlStar: !args.s })), null, 2)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably also want to include the sparqlStar
option in the toSparql
call above in case you don't know where the input is coming from.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah of course, I missed that one...
A key requirement for getting SPARQL* support in Comunica.
I've included all sparqlstar tests from here: https://github.com/RubenVerborgh/SPARQL.js/tree/master/queries/sparqlstar
I did however not include the tests with
quad
in the name due to difficulties with the quad mode.Since these are not officially part of SPARQL*, I did not spend too much effort on them, and created an issue instead: #68