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

Change Sort to have two static constructors #67

Closed
samdark opened this issue Dec 10, 2020 · 2 comments
Closed

Change Sort to have two static constructors #67

samdark opened this issue Dec 10, 2020 · 2 comments
Assignees
Labels
status:ready for adoption Feel free to implement this issue. type:enhancement Enhancement
Milestone

Comments

@samdark
Copy link
Member

samdark commented Dec 10, 2020

After #66 Sort is less usable for non-user input case. You have to specify all fields all the time and it's tedious.

I propose to have two static constructors:

  • Sort::fields() for user input with specifying allowed fields.
  • Sort::any() for non-user input allowing any fields.
@samdark samdark added type:enhancement Enhancement status:ready for adoption Feel free to implement this issue. labels Dec 10, 2020
@roxblnfk roxblnfk added this to the 1.0.0-alpha1 milestone Dec 10, 2020
@roxblnfk
Copy link
Member

roxblnfk commented Dec 10, 2020

Sort::fields(), Sort::any()

mb it will be more consistant:
Sort::only(), Sort::any()
or Sort::external()/Sort::internal() with the appropriate method isExternal()

@samdark
Copy link
Member Author

samdark commented Dec 10, 2020

only/any sounds alright.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:ready for adoption Feel free to implement this issue. type:enhancement Enhancement
Projects
None yet
Development

No branches or pull requests

2 participants