sqlite_shadow_sync 1.0.0
sqlite_shadow_sync: ^1.0.0 copied to clipboard
Zero-touch, trigger-driven, column-level CRDT offline-first synchronization engine for SQLite (drift, sqflite, sqlite3).
Changelog #
All notable changes to sqlite_shadow_sync will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.0 - 2026-10-30 #
Added #
- Core Engine:
Hlc: Lexicographically sortable Hybrid Logical Clock implementation with physical clock drift guards, sub-millisecond logical counters, and string parsing.SyncModels: SealedSyncStatushierarchy (SyncIdle,SyncPulling,SyncPushing,SyncSuccess,SyncError),ColumnDelta,RowDelta,SyncBatch, andSyncConflict.SyncSqlExecutor: Database-agnostic SQL execution abstraction with high-performanceSqlite3Executoradapter.SyncTransport: Abstract network transport contract withInMemorySyncTransportfor testing and simulation.
- Shadow Schema Architecture:
- Isolated metadata tables (
_sync_node_state,_sync_column_clock,_sync_outbox,_sync_tombstones) guaranteeing zero schema pollution on user tables. TriggerGenerator: DynamicPRAGMA table_infointrospector and SQLite trigger generator (AFTER INSERT,AFTER UPDATE,AFTER DELETE).- Outbox in-place compaction via SQLite
ON CONFLICT DO UPDATE. - Loop-safe trigger suppression during remote merges via
WHEN (SELECT is_pulling FROM _sync_node_state WHERE id = 1) = 0.
- Isolated metadata tables (
- Merge & Orchestration:
MergeEngine: Granular column-level Last-Write-Wins (LWW) conflict resolution and causal tombstone deletion handling.SyncOrchestrator: Full push/pull state machine with batch chunking, pagination watermarks, and exponential backoff retry with random jitter.
- Backend Reference Implementation:
- PostgreSQL schema and PL/pgSQL column-level LWW merge functions (
schema_and_merge.sql). - Production-ready ASP.NET Core (.NET 8/10) Minimal API controller (
SyncEndpoints.cs) usingNpgsqlandDapper.
- PostgreSQL schema and PL/pgSQL column-level LWW merge functions (
- Multi-Platform Support:
- 100% WebAssembly (Wasm) and native platform support with zero
dart:ioordart:htmlimports inlib/.
- 100% WebAssembly (Wasm) and native platform support with zero