-
Notifications
You must be signed in to change notification settings - Fork 7
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
Implement distinct field option for select #11
base: master
Are you sure you want to change the base?
Conversation
add correct path
pick distinctField value from params to avoid filter affecting
add distinct action checking
lib/scope.js
Outdated
@@ -44,6 +45,10 @@ class RestifizerScope { | |||
return this.checkActionName(ACTIONS.SELECT, ACTIONS.SELECT_ONE, ACTIONS.COUNT); | |||
} | |||
|
|||
isSelectDistinct() { | |||
return this.checkActionName(ACTIONS.DISTINCT); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add it to isSelect
, please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vedi, I just wanted to separate select and distinct, because in one of our projects the same collection post-processing lead to crashes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a select by the meaning, and you named the method isSelectDistinct
approving this. If you have an issue in your project after this change, it's better to update the code in your project.
Just in case, I mean to add DISTINCT checking to isSelect, and keep this method as well.
@vedi, I have a better idea, will close this one and create additional PR. |
# Conflicts: # package.json
No description provided.