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've started experimenting with libSql (using Swift) and noticed this behavior that, after everything I've read seems to be expected, but I just wanted to be sure because it isn't what I expected.
I ran the test app:
It successfully connected to the database, both local and online.
It then executed queries that created a table and added some rows.
I stopped the app and inspected both local and online databases and they were identical.
Via the Turso CLI I deleted a row online.
When I ran the app again, it synced and the row was deleted locally.
I then stoped the app, and manually deleted a row locally.
I ran the app again, and I expected to see the deleted row get removed from the online database, but apparently sync() is one-way only?
This leads me to wonder what happens if the device is offline? Is there no way to let the app continue using the local database and have it sync to the online db once an internet connection is established?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I've started experimenting with libSql (using Swift) and noticed this behavior that, after everything I've read seems to be expected, but I just wanted to be sure because it isn't what I expected.
I ran the test app:
It successfully connected to the database, both local and online.
It then executed queries that created a table and added some rows.
I stopped the app and inspected both local and online databases and they were identical.
Via the Turso CLI I deleted a row online.
When I ran the app again, it synced and the row was deleted locally.
I then stoped the app, and manually deleted a row locally.
I ran the app again, and I expected to see the deleted row get removed from the online database, but apparently sync() is one-way only?
This leads me to wonder what happens if the device is offline? Is there no way to let the app continue using the local database and have it sync to the online db once an internet connection is established?
Thank you
Beta Was this translation helpful? Give feedback.
All reactions