server/session library
Session / changeset extension — analogous to SQLite's session module
(sqlite3session_create, sqlite3changeset_apply).
A Session records every INSERT/UPDATE/DELETE that lands on the tables it watches while it is enabled. The recorded changes can be serialized into a portable JSON byte blob via Session.changeset and replayed on another Database (or the same one) with Database.applyChangeset.
The format is a UTF-8 JSON document. Not byte-compatible with
SQLite's binary .changeset format, but round-trips faithfully
across this engine and is trivial to inspect.
Classes
- Change
- One captured row-level change.
- Session
- A live recording of mutations against a Database. Construct via Database.beginSession. Sessions stay attached and recording until close is called.
Enums
- ConflictKind
- Reasons a change might fail to apply cleanly.
- ConflictResolution
- Conflict outcomes returned by an ChangesetConflictHandler.
Typedefs
- ChangesetConflictHandler = ConflictResolution Function(Change change, ConflictKind kind)