-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
feat: Add support for dot notation on array fields of Parse Object #9115
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
Conversation
Thanks for opening this pull request! |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## alpha #9115 +/- ##
==========================================
- Coverage 94.15% 94.14% -0.01%
==========================================
Files 186 186
Lines 14738 14750 +12
==========================================
+ Hits 13877 13887 +10
- Misses 861 863 +2 ☔ View full report in Codecov by Sentry. |
@mtrezza This is an extremely complicated feature. I tried running this with the SDK internal fix against the server test suite and got Array dot notation working but it somehow broke the server. I’ll let you know when this is ready for review. |
@mtrezza This is ready for review. |
Looks good to me, also the tests seem to cover it well; and with the additional test from #9179 I think we are on the safe side. Good to merge? I would then make a Parse Server stable release and deprecate Parse Server 7.1.0 due to the JS SDK bug. |
We are good to merge after the tests pass. |
Tests pass; but I see you made more commits; should I go ahead and merge? |
This is good to merge. I'll improve Postgres support in another PR (e.g increment, add, remove, delete). This PR has query support for PG so its a good start. |
# [7.1.0-alpha.16](7.1.0-alpha.15...7.1.0-alpha.16) (2024-07-08) ### Features * Add support for dot notation on array fields of Parse Object ([#9115](#9115)) ([cf4c880](cf4c880))
🎉 This change has been released in version 7.1.0-alpha.16 |
# [7.2.0-beta.1](7.1.0...7.2.0-beta.1) (2024-07-09) ### Bug Fixes * Invalid push notification tokens are not cleaned up from database for FCM API v2 ([#9173](#9173)) ([284da09](284da09)) ### Features * Add support for dot notation on array fields of Parse Object ([#9115](#9115)) ([cf4c880](cf4c880)) * Upgrade to @parse/push-adapter 6.4.0 ([#9182](#9182)) ([ef1634b](ef1634b)) * Upgrade to Parse JS SDK 5.3.0 ([#9180](#9180)) ([dca187f](dca187f))
🎉 This change has been released in version 7.2.0-beta.1 |
# [7.2.0](7.1.0...7.2.0) (2024-07-09) ### Bug Fixes * Invalid push notification tokens are not cleaned up from database for FCM API v2 ([#9173](#9173)) ([284da09](284da09)) ### Features * Add support for dot notation on array fields of Parse Object ([#9115](#9115)) ([cf4c880](cf4c880)) * Upgrade to @parse/push-adapter 6.4.0 ([#9182](#9182)) ([ef1634b](ef1634b)) * Upgrade to Parse JS SDK 5.3.0 ([#9180](#9180)) ([dca187f](dca187f))
🎉 This change has been released in version 7.2.0 |
Just FYI, Array operations like increment, add, remove currently doesn't work with dot notation because PG doesn't support multidimensional arrays and for one dimensional arrays you don't need dot notation. A lot of I created a branch incase anybody isn interested. Currently for arrays you can fetch, update and save but it won't be atomic. |
Pull Request
Issue
Currently all dot notations are treated as operations on Object type field. This results in a
error: Cannot read property '0' of undefined
when used on Array type fields.Closes: #6687
Approach
https://www.mongodb.com/docs/manual/core/document/#dot-notation
Tasks