-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
[DISCUSSION] Aggregate Queries #4197
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
Comments
If those are GET, we should probably follow the current paradigm with where=... so add a new
What do you think? |
Great idea that would be easier to implement then finding special What are you thoughts on PG? |
I’m not expert enough with PG, but the REST interface should be simple enough to be used, The focus should not be what is in one DB or the other, but abstracting the aggregation high enough that we can apply it to any DB provider. |
Also, we should probably restrict it to masterKey as it may spin the DB high enough to DoS it |
What should we do about test cases so we can test against any DB adapter? |
The DB adapter should expose probably a ‘runAggregate’ and if available, we run the ParseRESTAggregate object into it |
I can do a PR this weekend, might have to look into master key a bit. If there are any other ideas they are more than welcome. |
Gating with the masterKey should be pretty trivial in rest.js ;)
…On Sep 21, 2017, 19:56 -0400, Diamond Lewis ***@***.***>, wrote:
I can do a PR this weekend, might have to look into master key a bit. If there are any other ideas they are more than welcome.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
What about the return types? Should not be object right? So we could basically run it through an entire new endpoint /aggregate/:className no? |
I'm thinking array of results like find(). I'll have to check |
If you group by any key, the objectId won’t be relevant the contents may be ‘similar’ to an object, but the objectId may be an array no? |
If we run it through a new endpoint the result will be the same. If the user is using aggregate they should handle any return values right? |
Yep, but the return value won’t be interpolated a Parse Object but as a Parse Aggregate. In anycase, I don’t think we can match an aggregate result on an object (the base of an object is objectId unicity) |
aggregation operations are very expensive, user should be aware and informed on the impact of these operations on his DB performance. I mean we should note that in the docs. Also we must make sure that issues like #3813 never happen, so we should have security built-in from day 1. |
@flovilmart There is not even a mention of this on JS docs page. I have to dig through the API to find new methods and google what they do. |
I wanted to start a discussion on the best way to implement Aggregate Queries into Parse Server.
Starting with the REST
or
For Postgres we could build a basic aggregate to SQL transform and let the community build it.
Similar to
https://docs.mongodb.com/manual/reference/sql-aggregation-comparison/
For the SDK we could have a
query.aggregate()
Thoughts?
The text was updated successfully, but these errors were encountered: