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

Handle SPARQL* queries #69

Merged
merged 4 commits into from
Aug 31, 2020
Merged

Conversation

rubensworks
Copy link
Contributor

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

@rubensworks
Copy link
Contributor Author

Ah yes, this depends on DefinitelyTyped/DefinitelyTyped#46847, so can not be merged yet.

console.log(JSON.stringify(Util.objectify(translate(args._[0], { quads: args.q, sparqlStar: true })), null, 2));
Copy link
Owner

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.

Copy link
Contributor Author

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

Copy link
Owner

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?

Copy link
Contributor Author

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.

@rubensworks rubensworks requested a review from joachimvh August 28, 2020 14:50
console.log(JSON.stringify(Util.objectify(translate(args._[0], { quads: args.q, sparqlStar: !args.s })), null, 2));
Copy link
Owner

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.

Copy link
Contributor Author

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...

@rubensworks rubensworks requested a review from joachimvh August 31, 2020 08:17
@joachimvh joachimvh merged commit f5a0f11 into joachimvh:master Aug 31, 2020
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

Successfully merging this pull request may close these issues.

2 participants