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

[feature] Adding global sort order options #125

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

kav
Copy link
Contributor

@kav kav commented Feb 28, 2024

Adding sort orders options. They are a bit verbose but do explain themselves rather well. I can update docs but given it's an optional param I didn't want to confuse new users in the initial example. Also added a test that covers all cases. In the event a user selects an order that matches postgres natural sorting we don't append the null ordering param to keep behavior consistant with existing functionality.

Fixes #124

@coveralls
Copy link

coveralls commented Feb 28, 2024

Pull Request Test Coverage Report for Build 8311285451

Details

  • 9 of 9 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.3%) to 89.72%

Totals Coverage Status
Change from base Build 8079940929: 0.3%
Covered Lines: 280
Relevant Lines: 291

💛 - Coveralls

@scheiblr
Copy link
Collaborator

Tank you very much. The code looks good to me.
Although, it is a more advanced feature, I would recommend to document it in a specific section at the bottom of the readme. What do you think?

If not already done, please apply prettier.

@scheiblr scheiblr self-assigned this Feb 28, 2024
@scheiblr scheiblr self-requested a review February 28, 2024 11:37
@scheiblr scheiblr added the enhancement New feature or request label Feb 28, 2024
@kav
Copy link
Contributor Author

kav commented Feb 28, 2024

I reverted my prettier run as it updated a bunch of unrelated changes but I'll give it a go and let you take a look, also adding docs at the bottom of the readme

Copy link
Collaborator

@scheiblr scheiblr left a comment

Choose a reason for hiding this comment

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

please change the href in Postgrest supports specifying the position of nulls in sort [Ordering](https://postgrest.org/en/v12/references/api/tables_views.html#ordering). This can be configured via an optional data provider parameter: and let it link [sort ordering]. Thanks.

@kav kav requested a review from scheiblr March 16, 2024 23:41
Copy link
Collaborator

@scheiblr scheiblr left a comment

Choose a reason for hiding this comment

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

Thank you very much for the effort, looks good to me!

@scheiblr scheiblr merged commit 959fb4f into raphiniert-com:master Mar 19, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support specifying nullsfirst or nullslast in sorting config.
3 participants