You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have followed the supabase and powersync implementation in the supabase-simple-chat demo.
I have a column that has nullable string values. After I update the value to null in the local database via an INSERT OR REPLACE SQL statement. I can see the value in the sqlite database become null. However after a few seconds it seems to re-update its value back to the previous non null value.
I suspect the null update is not being pushed to supabase, but instead it is resetting my local to be in sync with supabase instead.
To strangely when i use an UPDATE instead of an INSERT OR REPLACE, it seems to work fine.
Hoping someone could advise on how to manage this?
The text was updated successfully, but these errors were encountered:
Values being reverted typically happens when your uploadData function calls .complete() on the batch/transaction without it having uploaded successfully. So the first thing to check is your application logs to see if you have any errors in your uploadData function (and make sure that errors are always logged in that function).
The difference between UPDATE and INSERT OR REPLACE is that a REPLACE operation is recorded as a DELETE + INSERT. So if you have for example a RLS rule that blocks deletes, that could explain the UPDATE working but INSERT OR REPLACE not.
I have followed the supabase and powersync implementation in the supabase-simple-chat demo.
I have a column that has nullable string values. After I update the value to null in the local database via an INSERT OR REPLACE SQL statement. I can see the value in the sqlite database become null. However after a few seconds it seems to re-update its value back to the previous non null value.
I suspect the null update is not being pushed to supabase, but instead it is resetting my local to be in sync with supabase instead.
To strangely when i use an UPDATE instead of an INSERT OR REPLACE, it seems to work fine.
Hoping someone could advise on how to manage this?
The text was updated successfully, but these errors were encountered: