Skip to content

Adds ability to set hint on Parse.Query #6322

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

Merged
merged 9 commits into from
Jan 14, 2020

Conversation

stevestencil
Copy link
Contributor

@stevestencil stevestencil commented Jan 7, 2020

Closes #6288

Copy link
Member

@dplewis dplewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you lint your code and add tests here? You can use the Rest API.

@codecov
Copy link

codecov bot commented Jan 8, 2020

Codecov Report

Merging #6322 into master will increase coverage by 0.03%.
The diff coverage is 92.85%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6322      +/-   ##
==========================================
+ Coverage   93.79%   93.83%   +0.03%     
==========================================
  Files         169      169              
  Lines       11609    11608       -1     
==========================================
+ Hits        10889    10892       +3     
+ Misses        720      716       -4
Impacted Files Coverage Δ
src/Options/index.js 100% <ø> (ø) ⬆️
src/RestQuery.js 95.47% <ø> (-0.05%) ⬇️
src/Options/Definitions.js 100% <ø> (ø) ⬆️
src/Controllers/DatabaseController.js 95.03% <100%> (-0.16%) ⬇️
src/Adapters/Storage/Mongo/MongoCollection.js 97.43% <100%> (+9.43%) ⬆️
src/Adapters/Storage/Mongo/MongoStorageAdapter.js 93.47% <100%> (-0.21%) ⬇️
src/Routers/AggregateRouter.js 100% <100%> (ø) ⬆️
src/Controllers/index.js 96.66% <100%> (ø) ⬆️
src/Routers/ClassesRouter.js 96.84% <100%> (+0.06%) ⬆️
src/Adapters/Logger/WinstonLogger.js 100% <100%> (ø) ⬆️
... and 12 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d41d035...eecc3ff. Read the comment docs.

@stevestencil
Copy link
Contributor Author

stevestencil commented Jan 10, 2020

I added you as a collaborator @dplewis

@dplewis
Copy link
Member

dplewis commented Jan 10, 2020

Following the MongoDB Driver I changed the following.

find(), aggregate() and count() can use hint
distinct doesn't but there is a ticket opened and its been there for a while.

@stevestencil If you have time you can also full add explain support. I added explain for testing (can't be access through REST API like hint). find(), aggregate() can use explain. This will allow us to write REST API tests.

@dplewis
Copy link
Member

dplewis commented Jan 14, 2020

@stevestencil How does this look?

@stevestencil
Copy link
Contributor Author

stevestencil commented Jan 14, 2020

Looks good! I just ran a few live tests and it appears everything worked great!
I will try to add remaining support for explain() tomorrow
Thanks!

Copy link
Member

@davimacedo davimacedo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job guys! It is very helpful. LGTM!

@dplewis dplewis merged commit 9842c6e into parse-community:master Jan 14, 2020
@stevestencil stevestencil deleted the query-hint branch January 21, 2020 19:24
@dplewis dplewis mentioned this pull request Feb 13, 2020
@TomWFox TomWFox changed the title adds ability to set hint on Parse.Query #6288 Adds ability to set hint on Parse.Query Feb 25, 2020
UnderratedDev pushed a commit to UnderratedDev/parse-server that referenced this pull request Mar 21, 2020
…ommunity#6322)

* added hint to aggregate

* added support for hint in query

* added else clause to aggregate

* fixed tests

* updated tests

* Add tests and clean up

* Add support for explain

Co-authored-by: Diamond Lewis <[email protected]>
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

Successfully merging this pull request may close these issues.

Add hint to Parse.Query
3 participants