artefactual-sdps / enduro

A tool to support ingest and automation in digital preservation workflows
https://enduro.readthedocs.io/
Apache License 2.0
4 stars 3 forks source link

Add a persistence query filter implementation #1025

Closed djjuhasz closed 1 month ago

djjuhasz commented 1 month ago

Refs #988, #514

To address #988 and provide a count of the total number of packages in the dashboard the API GET /package endpoint to provide total number of packages in a result set. Because we need to update the API and the underlying database calls, this is a good opportunity to also address #514 and add a general search implementation that allows filtering, ordering and paging results. This PR adds this general search filtering implementation with paging and ordering, and also provides a count of the total number of records matching the search criteria before paging.

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 98.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 54.22%. Comparing base (9997db0) to head (6d2dbb3). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/persistence/ent/client/filter.go 98.51% 1 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1025 +/- ## ========================================== + Coverage 53.10% 54.22% +1.11% ========================================== Files 100 103 +3 Lines 5807 5957 +150 ========================================== + Hits 3084 3230 +146 - Misses 2473 2475 +2 - Partials 250 252 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

jraddaoui commented 1 month ago

@sevein I am currently at SFA, if you have some time before I get to this, I'd appreciate if you could take a look.