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

Fix generating triples using shorthand notation when subject/predicate is the same #103

Merged
merged 1 commit into from
Jul 16, 2020

Conversation

AlexeyMz
Copy link
Contributor

Hi @RubenVerborgh !

While updating our SPARQL.js dependency to v3.0 at metaphacts we discovered that some queries are generated without short notation for triple sequence with the same subject or subject-predicate.

Here is an attempt to fix it by structurally comparing RDF/JS terms. There is a helper method equalTerms() defined to avoid using Term.equals() method as it's not available when de-serializing query from JSON.

In addition we prepared correct TypeScript typings for SPARQL.js v3.0 (issue #98) which will publish soon on DefinitelyTyped 😄

@RubenVerborgh RubenVerborgh merged commit 2acf89d into RubenVerborgh:master Jul 16, 2020
@RubenVerborgh
Copy link
Owner

Super, thanks a lot!

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