You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: clarify indexeddb adapter architecture and add json/prepared capabilities
- Updated all docs to clarify IndexedDB adapter is sql.js + IndexedDB persistence wrapper
- Added 'json' and 'prepared' capabilities to IndexedDB and sql.js adapters
- Updated README, PLATFORM_STRATEGY, and ARCHITECTURE docs
- Version bump to 0.3.2
Copy file name to clipboardExpand all lines: CHANGELOG.md
+17-1Lines changed: 17 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,10 +5,26 @@ All notable changes to this project will be documented in this file.
5
5
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
8
+
## [0.3.2] - 2025-11-07
9
+
10
+
### Changed
11
+
-**Documentation clarifications**: Updated all docs to clarify that IndexedDB adapter is sql.js + IndexedDB persistence wrapper (not a separate SQL engine)
12
+
-**Capability updates**: Added `json` and `prepared` capabilities to IndexedDB and sql.js adapters
13
+
- Both adapters now correctly declare JSON support (via SQLite JSON1 extension)
14
+
- Prepared statements capability added for both adapters
15
+
-**README updates**: Clarified IndexedDB adapter relationship with sql.js throughout documentation
16
+
17
+
### Documentation
18
+
- Updated README.md adapter matrix to clarify IndexedDB is sql.js wrapper
19
+
- Updated PLATFORM_STRATEGY.md with detailed explanation of IndexedDB + sql.js architecture
20
+
- Updated ARCHITECTURE.md to note IndexedDB adapter is not a separate SQL engine
21
+
- Added notes about JSON support via SQLite JSON1 extension for IndexedDB/sql.js adapters
22
+
8
23
## [0.3.0] - 2025-11-06
9
24
10
25
### Added
11
-
-**IndexedDB Adapter** (`IndexedDbAdapter`) - Browser-native SQL storage using IndexedDB with sql.js for full client-side operation
|**IndexedDB** (NEW) | ✅ Native browser API<br>✅ Async, non-blocking<br>✅ 50MB-1GB+ quota<br>✅ Structured transactions<br>✅ No WASM overhead| ❌ Complex API (wrapped by sql.js)<br>❌ IndexedDB quotas vary by browser<br>❌ No SQL queries (need sql.js layer) |**Primary choice** for web<br>Offline PWAs<br>Privacy-first apps |
23
+
|**IndexedDB** (NEW) | ✅ Native browser storage API<br>✅ Async, non-blocking<br>✅ 50MB-1GB+ quota<br>✅ sql.js wrapper (full SQL support)<br>✅ Persistent across sessions| ❌ Uses sql.js WASM (500KB load)<br>❌ IndexedDB quotas vary by browser<br>❌ Not a separate SQL engine (sql.js + IDB persistence) |**Primary choice** for web<br>Offline PWAs<br>Privacy-first apps |
24
24
|**sql.js**| ✅ Full SQLite in WASM<br>✅ In-memory fast reads<br>✅ Optional IDB persistence<br>✅ Zero dependencies | ❌ 500KB WASM load<br>❌ Slow writes to IDB<br>❌ Single-threaded | Fallback for web<br>Edge functions |
25
25
|**LocalStorage**| ✅ 5-10MB simple API | ❌ Synchronous (blocks UI)<br>❌ String-only<br>❌ No transactions | ❌ **NOT RECOMMENDED**|
26
26
27
-
**Winner:****IndexedDB + sql.js** (our new IndexedDbAdapter)
28
-
- Best of both: native IDB durability + SQL convenience
|**🆕 `indexeddb`**| bundled (sql.js) |**Browsers, PWAs**|sql.js + IndexedDB persistence wrapper, browser-native storage, 50MB-1GB+ quota, offline-first | IndexedDB quotas vary, WASM overhead (sql.js), not a separate SQL engine|
149
149
|`better-sqlite3`|`better-sqlite3`| Node/Electron, CLI, CI | Native performance, transactional semantics, WAL support | Needs native toolchain; version must match Node ABI |
- ✅ Prepared statements for performance and security
193
195
- ✅ Export/import (Uint8Array SQLite file format)
194
196
- ✅ Auto-save with batching (reduce IDB overhead)
195
197
198
+
**Note:** IndexedDB adapter is a wrapper around sql.js that adds IndexedDB persistence. It's not a separate SQL engine—it uses sql.js for all SQL operations and IndexedDB only for storing the database file. Since sql.js is full SQLite WASM, it supports all SQLite features including JSON functions, BLOBs, and full-text search.
199
+
196
200
## Platform Strategy
197
201
198
202
See [**PLATFORM_STRATEGY.md**](./PLATFORM_STRATEGY.md) for a comprehensive guide on:
**Important**: This adapter is **not a separate SQL engine**. It uses sql.js for all SQL execution and IndexedDB only for storing the SQLite database file as a binary blob. Think of it as "sql.js with automatic IndexedDB persistence."
|**Use Case**| Production web apps | Prototyping, edge functions |
255
258
256
-
**Recommendation**: Use **IndexedDB Adapter** for production web apps (automatic persistence). Use **SQL.js Adapter** only if you need manual control over save timing.
259
+
**Key Difference**: IndexedDB adapter is sql.js + automatic IndexedDB persistence wrapper. SQL.js adapter is sql.js with optional manual persistence. Both use the same SQL engine (sql.js).
0 commit comments