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

Rework get and find editions #518

Merged
merged 3 commits into from
Jan 9, 2025
Merged

Conversation

peterstadler
Copy link
Member

Description, Context and related Issue

When adding an edition file as test data to the testing/XQsuite/data collection the Edirom would automatically pick up this "edition". This PR rewrites the functions for finding (all) editions from the database (formerly edition:getUris#0, now edition:findEditionUris#0) and the function for retrieving (just) one edition by its ID or database path (formerly edition:findEdition#1, now edition:getEditionURI#1).

The notable difference of edition:getEditionURI#1 is that it now will return the empty sequence if no resolvable edition ID or path is provided. It will not magically search the whole database. If this is intended, you'll need to combine this with edition:findEditionUris#0. See index.xql where this change got necessary.

How Has This Been Tested?

Tested locally with the clarinet quintet and the Pintos data.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Improvement
  • Refactoring

Overview

  • I have updated the inline documentation accordingly.
  • I have performed a self-review of my code, according to the style guide
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes at testing
  • All new and existing tests passed.

@peterstadler peterstadler added this to the 1.0.0 milestone Jan 8, 2025
@peterstadler peterstadler added Type: bugfix A pull request providing a bugfix Area: XQuery labels Jan 8, 2025
Copy link
Member

@roewenstrunk roewenstrunk left a comment

Choose a reason for hiding this comment

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

Tested with Klarinettenquintett and Pintos.

@roewenstrunk roewenstrunk merged commit 9978a7d into develop Jan 9, 2025
5 checks passed
@roewenstrunk roewenstrunk deleted the rework-get-and-find-editions branch January 9, 2025 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: XQuery Type: bugfix A pull request providing a bugfix
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants