-
-
Notifications
You must be signed in to change notification settings - Fork 70
Conversation
Those lint's error should be fixed, when #81 is merged. I think it will cause merge conflicts, but I will resolve them then. |
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.
@Vinzent03
Thank you so much for an amazing work. I just had one suggestion about primary keys, but everything else looks beautiful!
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.
Few small things in the comments, but otherwise LGTM!! Thanks for the amazing work!
Co-authored-by: Tyler <18113850+dshukertjr@users.noreply.github.com>
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.
LGTM! Thanks for the amazing work!
Regarding the subject: stream replaces the correct row, I still encounter the bug after I upgrade to supabase-dart 0.2.12. (Note: Before upgrade to 0.2.12, the stream worked correctly.) I found the stream has a bug which cause an error: stream replace the correct row and cause error. When I insert a row into a table, it shows the following error message: In fact, I checked the data row I insert into the table is correct as follow: {projectId: 22-038, itemNumber: 7, itemName: test7, unit: M, unitPrice: 1500.0, contractQuantity: 500.0, contractAmount: 750000.0, remark: , cumulativeCompletedQuantity: 0.0} which is correct data. After the insert action is finished, the stream response and shows the data as follow: {contractAmount: null, contractQuantity: null, cumulativeCompletedQuantity: null, id: 87, itemName: test7, itemNumber: 7, projectId: 22-038, remark: , unit: M, unitPrice: null} at the same time I get the error message I mentioned above. ( This is because the stream replace my correct row with wrong row which change my original data to "null". Then, I check the database and found the correct row {projectId: 22-038, itemNumber: 7, itemName: test7, unit: M, unitPrice: 1500.0, contractQuantity: 500.0, contractAmount: 750000.0, remark: , cumulativeCompletedQuantity: 0.0} still insert into the database successfully. But my App become red screen and shows the error message which should not happen!! It's so strange!! Before I upgrade to supabase-dart 0.2.12 with new stream usage by primary-key, the stream worked very good and 100% correct for the same code to insert data to database. How can I resolve this problem?? |
Hi @JasonChiu-dev ! Could we see the code you are using to retrieve the stream? |
Here is my code to retrieve the stream(NOTE: ALL the code run correctly before supabase-dart 0.2.12):
(NOTE: ALL the code run correctly before supabase-dart 0.2.12) |
Is there anyone who know how to solve this stream bug? |
@JasonChiu-dev you can try to revert supabase-dart to v0.2.10 first if it worked for you previously |
i created new issue. let keep track the update here |
Hi Hieu, Thank you so much for your response. Regarding: "you can try to revert supabase-dart to v0.2.10 first if it worked for you previously", I did revert supabase-dart to v0.2.10 and the stream work correckly, but the other error occured, as follow: [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: type '_InternalLinkedHashMap<String, dynamic>' is not a subtype of type 'String?' in type cast I think we do need fully handle the stream bug and make things go right. For your information. |
The
stream
method needs now the primary key as parameter to detect the updated row correctly.I've marked the
primaryKeys
list from 'SupabaseRealtimePayload' as deprecated, because it's on the new RLS Realtime server always empty.As far as I know, there aren't any Supabase instances running without RLS Realtime anymore, so I think it's okay to force that parameter and don't be backward compatible. We could remove
primaryKeys
instead of marking it deprecated, too.close #74, close #78