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

Run custom query directly from MongoDB but return results through parse-server #192

Closed
5amfung opened this issue Feb 3, 2016 · 3 comments

Comments

@5amfung
Copy link

5amfung commented Feb 3, 2016

I need to run some complex queries (with aggregate functions and etc) which are not supported by the SDK. Perhaps I could construct my own query and send the query to mongo db directly from the cloud code using MongoClient. Once I get the results back, I want to transform them to Parse.Object and return them to the js client.

Is the following the right place to start with? Is it as simple as iterating the results and calling untransformObject()? Is there anything hidden that I'm not aware of that this approach would unlikely to work?

https://github.com/ParsePlatform/parse-server/blob/master/ExportAdapter.js#L580-L586

Thanks.

@gfosco
Copy link
Contributor

gfosco commented Feb 5, 2016

I'd say give it a shot... If you run in to problems, let me know. 👍

@gfosco gfosco closed this as completed Feb 5, 2016
@tarekskr
Copy link

Where you able to do this @5amfung ?

@chlebta
Copy link

chlebta commented Mar 23, 2017

@5amfung @tarekskr @gfosco
Is there any help for this ?

I need to run a complexe query where I've to use join and count

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

4 participants