Skip to main content

sqlite_shadow_sync 1.0.0 copy "sqlite_shadow_sync: ^1.0.0" to clipboard
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: Sealed SyncStatus hierarchy (SyncIdle, SyncPulling, SyncPushing, SyncSuccess, SyncError), ColumnDelta, RowDelta, SyncBatch, and SyncConflict.
    • SyncSqlExecutor: Database-agnostic SQL execution abstraction with high-performance Sqlite3Executor adapter.
    • SyncTransport: Abstract network transport contract with InMemorySyncTransport for 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: Dynamic PRAGMA table_info introspector 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.
  • 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) using Npgsql and Dapper.
  • Multi-Platform Support:
    • 100% WebAssembly (Wasm) and native platform support with zero dart:io or dart:html imports in lib/.
0
likes
160
points
713
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Zero-touch, trigger-driven, column-level CRDT offline-first synchronization engine for SQLite (drift, sqflite, sqlite3).

Repository (GitHub)
View/report issues

Topics

#sqlite #crdt #sync #offline-first #database

License

MIT (license)

Dependencies

meta, sqlite3

More

Packages that depend on sqlite_shadow_sync