SQLSync is a collaborative offline-first wrapper around SQLite. It is designed to synchronize web application state between users, devices, and the edge.
Now, reducers can handle errors. Before errors were silently handled in the host which led to the reactor failing in a half-open state (thus all future calls into the reactor would fail). Now errors are passed back from the host into the reducer where it can either handle it or fail in a closed state (as in the reactor task is cleaned up).
Fixes #27
To upgrade to this version of SQLSync you will need to recompile your Reducers after making the following changes:
Before:
execute!(
"INSERT INTO kv (key, value) VALUES (?, ?)
ON CONFLICT (key) DO UPDATE SET value = VALUES(value)",
key,
value
)
.await;
After:
execute!(
"INSERT INTO kv (key, value) VALUES (?, ?)
ON CONFLICT (key) DO UPDATE SET value = VALUES(value)",
key,
value
)
.await?;
(It's very subtle, the only change is adding a ? after the await to forward the error to the caller.)
Now, reducers can handle errors. Before errors were silently handled in the host which led to the reactor failing in a half-open state (thus all future calls into the reactor would fail). Now errors are passed back from the host into the reducer where it can either handle it or fail in a closed state (as in the reactor task is cleaned up).
Fixes #27
To upgrade to this version of SQLSync you will need to recompile your Reducers after making the following changes:
Before:
After:
(It's very subtle, the only change is adding a ? after the await to forward the error to the caller.)