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

SortBy ASC and DESC per Field #85

Open
1 task
artvel opened this issue Apr 23, 2022 · 3 comments
Open
1 task

SortBy ASC and DESC per Field #85

artvel opened this issue Apr 23, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@artvel
Copy link

artvel commented Apr 23, 2022

badgerhold is awesome!

  • To make the query even better it would be nice to have the possibility to define ASC or DESC per field.

What do you guys think?

@timshannon
Copy link
Owner

That's what the Reverse method does.

Where("field").Eq(value).SortBy("field").Reverse()

I'm glad you think badgerhold is awesome.

@artvel
Copy link
Author

artvel commented Apr 23, 2022

Yes, it does. But you can't combine it with multiple fields.

@timshannon timshannon added the enhancement New feature or request label Apr 23, 2022
@timshannon
Copy link
Owner

Apologies, I didn't' read the issue close enough. You're correct. Having multiple independent sorting per field isn't really doable currently.

Thanks for reporting.

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

No branches or pull requests

2 participants