-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
feat: Add support for $eq in LiveQuery #7607
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat: Add support for $eq in LiveQuery #7607
Conversation
Thanks for opening this pull request!
|
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
@sadakchap I have followed the dashboard "is null" filter issue until here: parse-community/parse-dashboard#1721 > parse-community/Parse-SDK-JS#1373 -> #7607 Is this PR the current stopper? |
I think so, with this PR, also all failing test should pass in parse-community/Parse-SDK-JS#1373. Then we can make changes accordingly in parse-community/parse-dashboard#1721 to get "is null" filter for dashboard. |
Do you need a hand with this PR, or this ready for review? |
I think it is ready for review. |
Oh even better, I'll take a look.. |
Could you merge master into this and add tests for LiveQuery? |
@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. 🙂 |
…server into feat/sendLiveQueryEvent
…feat/sendLiveQueryEvent
@sadakchap please let me know when this is ready for review. |
@sadakchap is this PR ready for review? |
Yes @mtrezza, I believe it is ready to be reviewed now. |
@@ -255,6 +255,71 @@ describe('matchesQuery', function () { | |||
expect(matchesQuery(img, q)).toBe(false); | |||
}); | |||
|
|||
it('matches on queries with new format #parse-SDK-JS/pull/1373', function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is this related to "add support for $eq in LiveQuery"? This is not a LiveQuery test. Is this a test for parse-community/Parse-SDK-JS#1373 which is a separate issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since in parse-community/Parse-SDK-JS#1373, we are changing the format of query
. There are certain LiveQuery tests(parse-sdk-js) which are failing because parse-server doesn't support new query format for LiveQuery.
So, we added support for new query
format in LiveQuery in parse-server.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure I follow; is parse-community/Parse-SDK-JS#1373 a requirement for this PR? I don't think so, otherwise the tests in this PR wouldn't already pass.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually its the other, please follow this parse-community/Parse-SDK-JS#1373 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I understand that the tests in parse-community/Parse-SDK-JS#1373 will only pass when this PR (#7607) has been merged. But they relate to 2 different features:
- add support for $eq in LiveQuery
- add support to "combine equalTo clauses with [other] clauses"
So why is parse-community/Parse-SDK-JS#1373 mentioned in this test case if this PR (#7607) has no dependency on parse-community/Parse-SDK-JS#1373, only the other way around?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mtrezza sorry, I could not understand you properly, could you please elaborate a bit more?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, it seems these are 2 different features:
- feat: Add support for $eq in LiveQuery #7607
- feat: combine equalTo clauses with clauses Parse-SDK-JS#1373
Even if parse-community/Parse-SDK-JS#1373 never gets merged, we would still want to merge #7607 as a feature, right? So I don't understand why the tests in #7607 mention parse-community/Parse-SDK-JS#1373:
it('matches on queries with new format #parse-SDK-JS/pull/1373', function () {
Closing via #8614 |
I will reformat the title to use the proper commit message syntax. |
New Pull Request Checklist
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 combiningequalTo
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