parse-server icon indicating copy to clipboard operation
parse-server copied to clipboard

feat: add support for $eq in LiveQuery

Open sadakchap opened this issue 3 years ago β€’ 12 comments

New Pull Request Checklist

  • [x] I am not disclosing a vulnerability.
  • [x] I am creating this PR in reference to an issue.

Issue Description

As per this issue, currently it is not possible to combine equalTo clause with any other clauses and vice-versa using Parse-SDK-JS. After adding support for combining equalTo clause with other clauses in Parse-SDK-JS's pr.

We need to add support equalTo for LiveQuery, so that it triggers correct events for client.

Related issue: 7606

Approach

add support for $eq query in LiveQuery's matchKeyConstraints.

TODOs before merging

  • [x] Add test cases

sadakchap avatar Oct 05 '21 15:10 sadakchap

Thanks for opening this pull request!

  • πŸŽ‰ We are excited about your hands-on contribution!

Codecov Report

Merging #7607 (c4a2ef9) into alpha (a5ffb95) will decrease coverage by 7.12%. The diff coverage is 83.33%.

:exclamation: Current head c4a2ef9 differs from pull request most recent head dd3ce1a. Consider uploading reports for the commit dd3ce1a to get more accurate results Impacted file tree graph

@@            Coverage Diff             @@
##            alpha    #7607      +/-   ##
==========================================
- Coverage   93.95%   86.82%   -7.13%     
==========================================
  Files         183      183              
  Lines       13655    13667      +12     
==========================================
- Hits        12830    11867     -963     
- Misses        825     1800     +975     
Impacted Files Coverage Ξ”
src/LiveQuery/QueryTools.js 94.05% <83.33%> (-0.68%) :arrow_down:
src/Adapters/Storage/Mongo/MongoCollection.js 4.76% <0.00%> (-92.86%) :arrow_down:
src/Adapters/Storage/Mongo/MongoStorageAdapter.js 11.99% <0.00%> (-81.38%) :arrow_down:
src/Adapters/Cache/RedisCacheAdapter.js 12.28% <0.00%> (-75.44%) :arrow_down:
src/Adapters/Files/GridFSBucketAdapter.js 10.65% <0.00%> (-68.86%) :arrow_down:
...rc/Adapters/Storage/Mongo/MongoSchemaCollection.js 35.48% <0.00%> (-62.37%) :arrow_down:
src/Adapters/Storage/Mongo/MongoTransform.js 48.51% <0.00%> (-39.60%) :arrow_down:
src/Adapters/Files/GridStoreAdapter.js 13.04% <0.00%> (-33.34%) :arrow_down:
src/Routers/SessionsRouter.js 65.71% <0.00%> (-25.72%) :arrow_down:
src/Routers/AggregateRouter.js 88.00% <0.00%> (-12.00%) :arrow_down:
... and 15 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 a5ffb95...dd3ce1a. Read the comment docs.

codecov[bot] avatar Oct 05 '21 16:10 codecov[bot]

@sadakchap I have followed the dashboard "is null" filter issue until here:

https://github.com/parse-community/parse-dashboard/pull/1721 > https://github.com/parse-community/Parse-SDK-JS/pull/1373 -> https://github.com/parse-community/parse-server/pull/7607

Is this PR the current stopper?

mtrezza avatar Oct 13 '21 09:10 mtrezza

Is this PR the current stopper?

I think so, with this PR, also all failing test should pass in https://github.com/parse-community/Parse-SDK-JS/pull/1373. Then we can make changes accordingly in https://github.com/parse-community/parse-dashboard/pull/1721 to get "is null" filter for dashboard.

sadakchap avatar Oct 13 '21 12:10 sadakchap

Do you need a hand with this PR, or this ready for review?

mtrezza avatar Oct 13 '21 14:10 mtrezza

Do you need a hand with this PR, or this ready for review?

I think it is ready for review.

sadakchap avatar Oct 13 '21 16:10 sadakchap

Oh even better, I'll take a look..

mtrezza avatar Oct 13 '21 17:10 mtrezza

Could you merge master into this and add tests for LiveQuery?

mtrezza avatar Oct 13 '21 17:10 mtrezza

@sadakchap Just a friendly ping, if you could add the tests that would be great, then we can merge and close the dashboard null filter issue as well. πŸ™‚

mtrezza avatar Oct 30 '21 08:10 mtrezza

@sadakchap please let me know when this is ready for review.

mtrezza avatar Nov 17 '21 12:11 mtrezza

@sadakchap is this PR ready for review?

mtrezza avatar Jan 01 '22 22:01 mtrezza

@sadakchap is this PR ready for review?

Yes @mtrezza, I believe it is ready to be reviewed now.

sadakchap avatar Jan 06 '22 06:01 sadakchap