Releases: framerslab/sql-storage-adapter
Releases · framerslab/sql-storage-adapter
sql-storage-adapter v0.6.6
Release v0.6.6
sql-storage-adapter v0.6.5
Fixed
- Postgres
exec()statement splitter is now comment- and string-aware. The prior splitter calledscript.split(';')with no awareness of--line comments,/* */block comments, single/double-quoted strings, or$tag$...$tag$dollar-quoted strings. A migration whoseCREATE TABLEbody included a--comment with an embedded;would be sliced at the comment's semicolon, leaving an unclosed paren that Postgres rejected with 42601 (syntax error at end of input). The newsplitSqlStatementshelper walks the script as a single-pass char state machine and only splits on top-level;.dataImport.importFromSQLnow uses the same splitter, replacing its previous line-comment pre-pass.
sql-storage-adapter v0.6.4
Release v0.6.4
sql-storage-adapter v0.6.2
Release v0.6.2
sql-storage-adapter v0.6.0
Added
- SqlDialect interface with
SqliteDialectandPostgresDialectimplementations for cross-platform SQL generation (insertOrIgnore,insertOrReplace,jsonExtract,ifnull,autoIncrementPrimaryKey,pragma,placeholder) - IFullTextSearch interface with
SqliteFts5(FTS5 virtual tables) andPostgresFts(tsvector/GIN) implementations for cross-platform full-text search (createIndex,matchClause,rankExpression,rebuildCommand,syncInsert,sanitizeQuery,joinClause) - IBlobCodec interface with
NodeBlobCodec(Buffer) andBrowserBlobCodec(DataView/Uint8Array) implementations for cross-platform binary vector encoding - IDatabaseExporter interface with
SqliteFileExporter(VACUUM INTO) andPostgresExporter(pg_dump) implementations createStorageFeatures(adapter)factory function that returns the correctStorageFeaturesbundle based on adapter kind and runtime environment- Postgres dialect integration test (skipped without
DATABASE_URL)
sql-storage-adapter v0.5.3
Release v0.5.3
sql-storage-adapter v0.5.2
Added
ensureColumnExistshelper for SQLite schema migrations — safely adds columns to existing tables without failing if the column already exists
sql-storage-adapter v0.5.1
Added
-
Electron Adapter - Full-featured Electron support with IPC bridge architecture
ElectronMainAdapter: Main process adapter wrapping better-sqlite3 with WAL, recovery, and multi-window supportElectronRendererAdapter: Renderer process proxy with transparent IPC communication- Preload script with
contextBridgefor secure renderer access - Type-safe IPC protocol with request/response correlation
- WAL checkpoint management and corruption detection
- Auto-migration system with app version tracking
- Multi-window database change broadcasting
- Export:
@framers/sql-storage-adapter/electron
-
Cross-Platform Sync Module - Real-time delta synchronization across platforms
CrossPlatformSync: Main sync orchestrator with configurable table priorities- Vector Clocks: Distributed causality tracking for conflict detection
- WebSocket Transport: Real-time bidirectional sync with auto-reconnection and heartbeats
- HTTP Transport: Polling fallback for firewalls/proxies that block WebSocket
- Conflict Resolution: Strategies include
last-write-wins,local-wins,remote-wins,merge,manual - Device Registry: Track and manage syncing devices with presence status
- SyncLogManager: Change log and conflict tables for delta tracking
- UI hooks for custom conflict resolution dialogs
- Export:
@framers/sql-storage-adapter/sync
Changed
- Updated package exports to include
/electron,/electron/preload, and/syncentry points - Enhanced
StorageContextwith Electron-specific properties
Technical Details
- Vector clocks use
Record<string, number>for causality comparison - Sync protocol messages use underscore naming (
delta_push,handshake_response) - Transport layer abstracts WebSocket/HTTP with unified event system
- Field mergers support custom merge logic for complex data types
sql-storage-adapter v0.5.0
chore: bump version to 0.5.0 for indexedDb options release
sql-storage-adapter v0.4.2
Fixed
- better-sqlite3 directory creation: Adapter now creates parent directories before opening database file (fixes SQLITE_CANTOPEN when directory doesn't exist)
- ESLint monorepo conflict: Added
tsconfigRootDirto ESLint config to resolve parsing errors in monorepo setups - TypeDoc build: Moved guide docs from
docs/toguides/to prevent deletion by TypeDoc'scleanOutputDir - README logo: Fixed Frame.dev logo URL (was 404ing due to incorrect path format)
Added
- New test file
betterSqliteAdapter.spec.tsfor directory creation tests