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

feat: Implement RDF/JS dataset specification #392

Merged
merged 13 commits into from
Jul 29, 2024
Merged

feat: Implement RDF/JS dataset specification #392

merged 13 commits into from
Jul 29, 2024

Conversation

jeswr
Copy link
Collaborator

@jeswr jeswr commented Jul 28, 2024

Draft PR to add full functionality of https://github.com/rdfjs/types/blob/master/dataset.d.ts. Observe that we alter the behavior of #empty on the empty set to now return true instead of false, as described in #391 - so it may be that this needs to be an mver bump.

Supercedes #288, pushing to a branch on the N3.js repo so CI will run.

Closes #390
Closes #391

@jeswr jeswr changed the title Feat/dataset feat: Implement RDF/JS dataset specification Jul 28, 2024
@jeswr jeswr requested a review from RubenVerborgh July 28, 2024 07:35
Comment on lines +821 to +823
difference(other) {
return this.filter(quad => !other.has(quad));
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is lots of room for optimisation here; in particular, whenever other is also an N3Store and they share an index we can just merge / diff / compare the indices for set operations.

Would be worth opening up an issue to do this once this PR is merged.

Copy link
Contributor

@TallTed TallTed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor, editorial, human-facing

README.md Outdated Show resolved Hide resolved
src/N3Store.js Outdated Show resolved Hide resolved
src/N3Store.js Outdated Show resolved Hide resolved
src/N3Store.js Outdated Show resolved Hide resolved
src/N3Store.js Outdated Show resolved Hide resolved
src/N3Store.js Outdated Show resolved Hide resolved
src/N3Store.js Outdated Show resolved Hide resolved
src/N3Store.js Outdated Show resolved Hide resolved
src/N3Store.js Outdated Show resolved Hide resolved
src/N3Store.js Outdated Show resolved Hide resolved
Copy link
Member

@RubenVerborgh RubenVerborgh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is great!

jeswr and others added 5 commits July 30, 2024 08:29
Co-authored-by: Ted Thibodeau Jr <[email protected]>
Co-authored-by: Ted Thibodeau Jr <[email protected]>
Co-authored-by: Ted Thibodeau Jr <[email protected]>
Co-authored-by: Ted Thibodeau Jr <[email protected]>
@jeswr jeswr merged commit 1a6122e into main Jul 29, 2024
14 checks passed
@jeswr jeswr deleted the feat/dataset branch July 29, 2024 22:44
Copy link

🎉 This PR is included in version 1.19.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

Why does #every return false on the empty store Support for set operations on graphs/datasets in the N3Store
3 participants