-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Find the distinct values for a specified column #2238
Comments
This is not implemented yet but you could work on a PR that implements it |
I can take this up. Is there a API design for this?
|
We usually Mark custom operators with a $ i.e. $distinct |
Any news regarding this enhancement ? thanks. |
@ranhsd It's up for the taking :) |
@flovilmart This change should be done in the DataBaseController.js right ? |
@ranhsd, I just poked around out of curiosity, I'd think that you'd need to add it first to RestQuery which will call find on the DataBaseController that will then use the MongoCollection.find (or postgress). Would at least need to touch a comment in LiveQuery/QueryTools.js This is just my quick look around. Seems like following how skip and limit are done are good parallels since they are constraints on a find, like distinct is. ymmv :) |
+1 for this feature |
I know MongoDB well and what would be great for me is a way to use mongo directly, with the aggregation framework and all. I know it's a lot a ask. |
+1 |
+1 Any news on this implementation? |
@pewh no, but PRs are more than welcome 😉 |
Im sure there was a PR already for this! can anybody confirm? |
+1 for this. @Cliffordwh - I did a quick search on open/closed PRs and couldn't find this. Hoping someone will pick this up and implement soon. |
china parse Key Operation
link http://docs.bmob.cn/data/Restful/b_developdoc/doc/index.html |
After hours of looking, the only solution i found is to get all rows and do distinct by yourself. To get all rows, beyond the limit of 1000, and the skip limit of 10000, this is a great solution. |
@davimacedo We could have some query parameters to select distinct values, no? What do you think? |
I think the API suggested in the beginning of the thread would be good: We would have to handle this in ClassesRouter -> rest -> RestQuery -> DataBaseController -> Mongo and Postrgres adapters. For mongo we can implement it using https://docs.mongodb.com/manual/reference/method/db.collection.distinct/. For postgres using SELECT DISTINCT ... (https://www.postgresql.org/docs/9.0/static/sql-select.html) I've just added it to my personal kanban. I can try to write something soon. |
We really need this |
Does the new aggregate queries support pointers? |
I don’t think so. But it does support dot notation. Feel free to open a PR, we’ll review it. You could do |
yeah I tried your suggestion before (pointer.objectId) before but no results |
It’s up for the taking 😉 |
Find the distinct values for a specified column across a single table and returns the result,
Based on this discussion:
https://www.parse.com/questions/retrieving-unique-values
The text was updated successfully, but these errors were encountered: