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

ascend/descend option for "OrderBy" method. #45

Closed
coocood opened this issue Jan 25, 2013 · 2 comments
Closed

ascend/descend option for "OrderBy" method. #45

coocood opened this issue Jan 25, 2013 · 2 comments

Comments

@coocood
Copy link
Contributor

coocood commented Jan 25, 2013

the "OrderBy" method needs an descending option.
or add another method like "OrderByDesc"

@coocood
Copy link
Contributor Author

coocood commented Jan 26, 2013

In my project, I added a new field "orderByDesc bool" in Hood struct, and changed "OrderBy(path Path)" to "OrderBy(path Path, desc bool)", but that's just a temporary work around, there should be multiple order by support and multiple group by support.

@eaigner
Copy link
Owner

eaigner commented Jan 26, 2013

I would just have added a Asc() and Desc() chainable method instead. No flag required and more readable.

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

No branches or pull requests

2 participants