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

Extract next link query param creation into EntriesCollection method. #1561

Merged

Conversation

markus1978
Copy link
Contributor

This would allow different EntriesCollection implementations to alter how the URL query parameters for the next links are produced. How request params are handled is already part of EntriesCollection, it would be logical to also have the request params for the "next" request handled here.

The value-based pagination can depend on back-end implementation details. For example, in elasticsearch you would combine the sort-by property values with ids to create a value with tie-breaker.

@markus1978 markus1978 force-pushed the ms/customizable_next_params branch 3 times, most recently from c5b1a98 to 47e808c Compare March 16, 2023 10:19
@codecov
Copy link

codecov bot commented Mar 16, 2023

Codecov Report

Merging #1561 (d495b24) into master (d779725) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head d495b24 differs from pull request most recent head 9e58e9f. Consider uploading reports for the commit 9e58e9f to get more accurate results

@@           Coverage Diff           @@
##           master    #1561   +/-   ##
=======================================
  Coverage   91.09%   91.10%           
=======================================
  Files          74       74           
  Lines        4538     4542    +4     
=======================================
+ Hits         4134     4138    +4     
  Misses        404      404           
Flag Coverage Δ
project 91.10% <100.00%> (+<0.01%) ⬆️
validator 90.99% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...made/server/entry_collections/entry_collections.py 97.91% <100.00%> (+0.07%) ⬆️
optimade/server/routers/utils.py 95.93% <100.00%> (-0.04%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@ml-evs ml-evs force-pushed the ms/customizable_next_params branch from d495b24 to 9e58e9f Compare March 16, 2023 14:39
Copy link
Member

@ml-evs ml-evs left a comment

Choose a reason for hiding this comment

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

Thanks @markus1978, I'll merge and use this in #1560

@ml-evs ml-evs enabled auto-merge (squash) March 16, 2023 14:40
@ml-evs ml-evs merged commit d5e7c15 into Materials-Consortia:master Mar 16, 2023
9 checks passed
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.

None yet

2 participants