{"_id":"@aiao/rxdb-adapter-sqlite-wasm","_rev":"7-792962443b9d334842f86b28be460485","name":"@aiao/rxdb-adapter-sqlite-wasm","dist-tags":{"latest":"0.0.26"},"versions":{"0.0.20":{"name":"@aiao/rxdb-adapter-sqlite-wasm","version":"0.0.20","_id":"@aiao/rxdb-adapter-sqlite-wasm@0.0.20","maintainers":[{"name":"aiao","email":"hero63418@gmail.com"}],"nx":{"name":"rxdb-adapter-sqlite-wasm","tags":["js-lib"]},"dist":{"shasum":"a16e07f83d4f2824cbb0f6ebb018066db799cdfb","tarball":"https://registry.npmjs.org/@aiao/rxdb-adapter-sqlite-wasm/-/rxdb-adapter-sqlite-wasm-0.0.20.tgz","fileCount":20,"integrity":"sha512-MGTkW26i5+o85VjJhmtNXsy03zQOaMWALyYFhJrMdBYtfTnyTNlToP6i4hYNLqT92eP4tgDVzNUhQzUsDKGp7g==","signatures":[{"sig":"MEYCIQDzMXjQZu6s3cWx3R6+m+FGTas9mARgCrT3Oq8B2Kz6vAIhAKpIMc2TVZNdsHs3fXZH+fgZ8envTuskenhdkbHkml4K","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23002},"main":"./dist/index.js","type":"module","_from":"file:aiao-rxdb-adapter-sqlite-wasm-0.0.20.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","@aiao/source":"./src/index.ts"},"./package.json":"./package.json"},"_npmUser":{"name":"aiao","email":"hero63418@gmail.com"},"_resolved":"/private/var/folders/1s/1sk5kvms7jj4z6glj40__v300000gn/T/d32d51d4afa806426b0c6e07204ae339/aiao-rxdb-adapter-sqlite-wasm-0.0.20.tgz","_integrity":"sha512-MGTkW26i5+o85VjJhmtNXsy03zQOaMWALyYFhJrMdBYtfTnyTNlToP6i4hYNLqT92eP4tgDVzNUhQzUsDKGp7g==","_npmVersion":"11.9.0","description":"RxDB SQLite 适配器，基于 [@subframe7536/sqlite-wasm](https://github.com/subframe7536/sqlite-wasm)。","directories":{},"_nodeVersion":"24.14.0","dependencies":{"comlink":"^4.4.2","@aiao/rxdb":"0.0.20","@aiao/utils":"0.0.20","@subframe7536/sqlite-wasm":"^1.1.0","@aiao/rxdb-adapter-sqlite-core":"0.0.20"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"ms":"^2.1.3","@aiao/rxdb-test":"0.0.20"},"_npmOperationalInternal":{"tmp":"tmp/rxdb-adapter-sqlite-wasm_0.0.20_1779246549506_0.6336918798696529","host":"s3://npm-registry-packages-npm-production"}},"0.0.21":{"name":"@aiao/rxdb-adapter-sqlite-wasm","version":"0.0.21","_id":"@aiao/rxdb-adapter-sqlite-wasm@0.0.21","maintainers":[{"name":"aiao","email":"hero63418@gmail.com"}],"nx":{"name":"rxdb-adapter-sqlite-wasm","tags":["js-lib"]},"dist":{"shasum":"136118660e1b5264e017ca69494795a33664c0a7","tarball":"https://registry.npmjs.org/@aiao/rxdb-adapter-sqlite-wasm/-/rxdb-adapter-sqlite-wasm-0.0.21.tgz","fileCount":23,"integrity":"sha512-IV/FR3ZNUlDL38gQeAUV7rbCQKYrNd/NEhq3/bx3G4K9Doc7mUvRMXU1+qffvoCXKr85wjkyksY11zUmDMZFGQ==","signatures":[{"sig":"MEQCIFEel/6wZRbY1wAAkgsbEZn83RZ+KAnAVeWirK/tUPmLAiAFQ5Kyy7Ajx0zqnbAvUqh1eYFTqmJAfZRW9ebKr7lzDw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":26030},"main":"./dist/index.js","type":"module","_from":"file:aiao-rxdb-adapter-sqlite-wasm-0.0.21.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","@aiao/source":"./src/index.ts"},"./package.json":"./package.json"},"_npmUser":{"name":"aiao","email":"hero63418@gmail.com"},"_resolved":"/private/var/folders/1s/1sk5kvms7jj4z6glj40__v300000gn/T/0baacf06058296a0623660c64836e6e4/aiao-rxdb-adapter-sqlite-wasm-0.0.21.tgz","_integrity":"sha512-IV/FR3ZNUlDL38gQeAUV7rbCQKYrNd/NEhq3/bx3G4K9Doc7mUvRMXU1+qffvoCXKr85wjkyksY11zUmDMZFGQ==","_npmVersion":"11.16.0","description":"RxDB SQLite 适配器，基于 [@subframe7536/sqlite-wasm](https://github.com/subframe7536/sqlite-wasm)。","directories":{},"_nodeVersion":"24.18.0","dependencies":{"@aiao/rxdb":"0.0.21","@aiao/utils":"0.0.21","@subframe7536/sqlite-wasm":"^1.3.1","@aiao/rxdb-adapter-sqlite-core":"0.0.21"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"ms":"^2.1.3","@aiao/rxdb-test":"0.0.21"},"_npmOperationalInternal":{"tmp":"tmp/rxdb-adapter-sqlite-wasm_0.0.21_1784362935401_0.636177004055483","host":"s3://npm-registry-packages-npm-production"}},"0.0.22":{"name":"@aiao/rxdb-adapter-sqlite-wasm","version":"0.0.22","_id":"@aiao/rxdb-adapter-sqlite-wasm@0.0.22","maintainers":[{"name":"aiao","email":"hero63418@gmail.com"}],"nx":{"name":"rxdb-adapter-sqlite-wasm","tags":["js-lib"]},"dist":{"shasum":"02c21f88c228a8280229a46c6deb00c05fdcc7ec","tarball":"https://registry.npmjs.org/@aiao/rxdb-adapter-sqlite-wasm/-/rxdb-adapter-sqlite-wasm-0.0.22.tgz","fileCount":23,"integrity":"sha512-0402PAybFx7xiEdomjCRehKhBmDZ62VqG6USIPFdV2WcichLDtEBHxPEeEhXLuMsojW0FYp6sitGe/JnXxnnCw==","signatures":[{"sig":"MEUCIQCZb56QgQLgbSPhTkYzk3UB1KVm130y/nVIGIbup9GLxAIgXUhmeddMD8VDso9uCT8zbblR6cCOSldm4MrEW9xbnJc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":26030},"main":"./dist/index.js","type":"module","_from":"file:aiao-rxdb-adapter-sqlite-wasm-0.0.22.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","@aiao/source":"./src/index.ts"},"./package.json":"./package.json"},"_npmUser":{"name":"aiao","email":"hero63418@gmail.com"},"_resolved":"/private/var/folders/1s/1sk5kvms7jj4z6glj40__v300000gn/T/aa6a166b0848ba2049cc80981833363b/aiao-rxdb-adapter-sqlite-wasm-0.0.22.tgz","_integrity":"sha512-0402PAybFx7xiEdomjCRehKhBmDZ62VqG6USIPFdV2WcichLDtEBHxPEeEhXLuMsojW0FYp6sitGe/JnXxnnCw==","_npmVersion":"10.9.2","description":"RxDB SQLite 适配器，基于 [@subframe7536/sqlite-wasm](https://github.com/subframe7536/sqlite-wasm)。","directories":{},"_nodeVersion":"22.14.0","dependencies":{"@aiao/rxdb":"0.0.22","@aiao/utils":"0.0.22","@subframe7536/sqlite-wasm":"^1.3.1","@aiao/rxdb-adapter-sqlite-core":"0.0.22"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"ms":"^2.1.3","@aiao/rxdb-test":"0.0.22"},"_npmOperationalInternal":{"tmp":"tmp/rxdb-adapter-sqlite-wasm_0.0.22_1785482822622_0.0894525757160407","host":"s3://npm-registry-packages-npm-production"}},"0.0.23":{"name":"@aiao/rxdb-adapter-sqlite-wasm","version":"0.0.23","_id":"@aiao/rxdb-adapter-sqlite-wasm@0.0.23","maintainers":[{"name":"aiao","email":"hero63418@gmail.com"}],"nx":{"name":"rxdb-adapter-sqlite-wasm","tags":["js-lib"]},"dist":{"shasum":"0ee8ae0a98f6969f31bca9da82c46f02547f0657","tarball":"https://registry.npmjs.org/@aiao/rxdb-adapter-sqlite-wasm/-/rxdb-adapter-sqlite-wasm-0.0.23.tgz","fileCount":23,"integrity":"sha512-aPt5Bht/WOPRp99Wy3kCZZqXH1YpcVusuCPLQxJ9iAPBvnZT0A1EozKGCWLpKW2DP9qO1Ar1kl6tV1pZ5leJYw==","signatures":[{"sig":"MEUCIQCIRE27lE/2RlEGoj0l0FfAqpdbfveAVk9rOwJkmE8e4AIgbafPBQMLew7mrcJ9sPFTm1YtNwr8CObSllyH95DiIdE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":26030},"main":"./dist/index.js","type":"module","_from":"file:aiao-rxdb-adapter-sqlite-wasm-0.0.23.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","@aiao/source":"./src/index.ts"},"./package.json":"./package.json"},"_npmUser":{"name":"aiao","email":"hero63418@gmail.com"},"_resolved":"/private/var/folders/1s/1sk5kvms7jj4z6glj40__v300000gn/T/2a5dd8c628e91347b402a969427ae4e7/aiao-rxdb-adapter-sqlite-wasm-0.0.23.tgz","_integrity":"sha512-aPt5Bht/WOPRp99Wy3kCZZqXH1YpcVusuCPLQxJ9iAPBvnZT0A1EozKGCWLpKW2DP9qO1Ar1kl6tV1pZ5leJYw==","_npmVersion":"10.9.2","description":"RxDB SQLite 适配器，基于 [@subframe7536/sqlite-wasm](https://github.com/subframe7536/sqlite-wasm)。","directories":{},"_nodeVersion":"22.14.0","dependencies":{"@aiao/rxdb":"0.0.23","@aiao/utils":"0.0.23","@subframe7536/sqlite-wasm":"^1.3.1","@aiao/rxdb-adapter-sqlite-core":"0.0.23"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"ms":"^2.1.3","@aiao/rxdb-test":"0.0.23"},"_npmOperationalInternal":{"tmp":"tmp/rxdb-adapter-sqlite-wasm_0.0.23_1785736182565_0.23315962966874415","host":"s3://npm-registry-packages-npm-production"}},"0.0.24":{"name":"@aiao/rxdb-adapter-sqlite-wasm","version":"0.0.24","license":"MIT","_id":"@aiao/rxdb-adapter-sqlite-wasm@0.0.24","maintainers":[{"name":"aiao","email":"hero63418@gmail.com"}],"nx":{"name":"rxdb-adapter-sqlite-wasm","tags":["js-lib"]},"dist":{"shasum":"7fcd9313fa47b13622c9dcd6a27c1e4b83e12496","tarball":"https://registry.npmjs.org/@aiao/rxdb-adapter-sqlite-wasm/-/rxdb-adapter-sqlite-wasm-0.0.24.tgz","fileCount":32,"integrity":"sha512-qxhNLMKF8dOjuRAcSe/NkPbxYnRSxIPrAebxsg8/y5snfjnQHvAi1A8Yknj4nO8+1E+qGAKfzRu436rFg4WwSQ==","signatures":[{"sig":"MEYCIQC1wM0l57OC7oOEDQ1zfchZwPxNFynqtU/SWLoZZmCZUQIhAMwi2OCvaE6ntcBYFmdaVIwUAof4Z7bUiSselc++2lRg","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":64215},"main":"./dist/index.js","type":"module","_from":"file:aiao-rxdb-adapter-sqlite-wasm-0.0.24.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./package.json":"./package.json"},"_npmUser":{"name":"aiao","email":"hero63418@gmail.com"},"_resolved":"/private/var/folders/1s/1sk5kvms7jj4z6glj40__v300000gn/T/25297a8bed7d817990cc3a73af365514/aiao-rxdb-adapter-sqlite-wasm-0.0.24.tgz","_integrity":"sha512-qxhNLMKF8dOjuRAcSe/NkPbxYnRSxIPrAebxsg8/y5snfjnQHvAi1A8Yknj4nO8+1E+qGAKfzRu436rFg4WwSQ==","_npmVersion":"11.19.0","description":"RxDB SQLite 适配器，基于 [@subframe7536/sqlite-wasm](https://github.com/subframe7536/sqlite-wasm)。","directories":{},"_nodeVersion":"26.7.0","dependencies":{"@aiao/rxdb":"0.0.24","@aiao/utils":"0.0.24","@subframe7536/sqlite-wasm":"^1.3.1","@aiao/rxdb-adapter-sqlite-core":"0.0.24"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"ms":"^2.1.3","@aiao/rxdb-test":"0.0.24"},"peerDependencies":{"comlink":"^4.4.2"},"peerDependenciesMeta":{"comlink":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/rxdb-adapter-sqlite-wasm_0.0.24_1786439110309_0.42291167428163434","host":"s3://npm-registry-packages-npm-production"}},"0.0.25":{"name":"@aiao/rxdb-adapter-sqlite-wasm","version":"0.0.25","license":"MIT","_id":"@aiao/rxdb-adapter-sqlite-wasm@0.0.25","maintainers":[{"name":"aiao","email":"hero63418@gmail.com"}],"homepage":"https://github.com/aiao-io/rxdb#readme","bugs":{"url":"https://github.com/aiao-io/rxdb/issues"},"nx":{"name":"rxdb-adapter-sqlite-wasm","tags":["js-lib"]},"dist":{"shasum":"8b77760ad142a8403929acc7dc62a79b1fecf63e","tarball":"https://registry.npmjs.org/@aiao/rxdb-adapter-sqlite-wasm/-/rxdb-adapter-sqlite-wasm-0.0.25.tgz","fileCount":32,"integrity":"sha512-41oPZfEAzd/PtZGVBi9XScnVRe0/ETkTjh49Orre4j8qe0I/0CO/ruH0DFWIrG/2BzcbZQSuId/TVGBaFkKVYw==","signatures":[{"sig":"MEQCIAOjEoWLvoG15MolY1huOFSW7VOCGXzGw/EDPctJxzmHAiAL/BqSm3zL1GzgItvLw2DMKtyJisrTwinLf4Fjvj88Zg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aiao%2frxdb-adapter-sqlite-wasm@0.0.25","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":64364},"main":"./dist/index.js","type":"module","_from":"file:aiao-rxdb-adapter-sqlite-wasm-0.0.25.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./package.json":"./package.json"},"_npmUser":{"name":"aiao","email":"hero63418@gmail.com"},"_resolved":"/tmp/2e4e5c524703799595c8c89df8beb338/aiao-rxdb-adapter-sqlite-wasm-0.0.25.tgz","_integrity":"sha512-41oPZfEAzd/PtZGVBi9XScnVRe0/ETkTjh49Orre4j8qe0I/0CO/ruH0DFWIrG/2BzcbZQSuId/TVGBaFkKVYw==","repository":{"url":"git+https://github.com/aiao-io/rxdb.git","type":"git","directory":"packages/rxdb-adapter-sqlite-wasm"},"_npmVersion":"11.19.0","description":"RxDB SQLite 适配器，基于 [@subframe7536/sqlite-wasm](https://github.com/subframe7536/sqlite-wasm)。","directories":{},"_nodeVersion":"26.7.0","dependencies":{"@aiao/rxdb":"0.0.25","@aiao/utils":"0.0.25","@subframe7536/sqlite-wasm":"^1.3.1","@aiao/rxdb-adapter-sqlite-core":"0.0.25"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"ms":"^2.1.3","@aiao/rxdb-test":"0.0.25"},"peerDependencies":{"comlink":"^4.4.2"},"peerDependenciesMeta":{"comlink":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/rxdb-adapter-sqlite-wasm_0.0.25_1786694775273_0.4010355826123393","host":"s3://npm-registry-packages-npm-production"}},"0.0.26":{"nx":{"name":"rxdb-adapter-sqlite-wasm","tags":["js-lib"]},"_id":"@aiao/rxdb-adapter-sqlite-wasm@0.0.26","bugs":{"url":"https://github.com/aiao-io/rxdb/issues"},"dist":{"shasum":"fe42e73791f411d2fe31bf6623c275dfdcdbc72e","tarball":"https://registry.npmjs.org/@aiao/rxdb-adapter-sqlite-wasm/-/rxdb-adapter-sqlite-wasm-0.0.26.tgz","fileCount":37,"integrity":"sha512-lEoQ5CfgsavXH4sV2dVWNfCAK5G/bq8eiImT1zqF5acIY3UbFqOuZ5vDWWGoVTZ3DetLdU5+Fz5EDkOrFypyCQ==","signatures":[{"sig":"MEYCIQCCaaDNl4IGOE8I9cxgswVo9EnZcz2FHIbxeFzGrqTpkgIhAKS8WE5BnLZc2TRfHHJbawTtgR+ny6c/dxgymep6Z1OH","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIG4Eo4JdihjHSKosG33VbU0bg8QONHLF/I11+OmavXebAiBXLsfOSg+ptRfEwoyi+EUKhyxvomD6gjcyMKu5xs3Z8Q=="}],"unpackedSize":3055161},"main":"./dist/index.js","name":"@aiao/rxdb-adapter-sqlite-wasm","type":"module","_from":"file:aiao-rxdb-adapter-sqlite-wasm-0.0.26.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./testing":{"types":"./dist/testing.d.ts","import":"./dist/testing.js","default":"./dist/testing.js","@aiao/source":"./src/testing.ts"},"./package.json":"./package.json"},"license":"MIT","version":"0.0.26","_npmUser":{"name":"aiao","email":"hero63418@gmail.com"},"homepage":"https://rxdb.netlify.app/docs/adapters/sqlite-wasm","keywords":["aiao","rxdb","sqlite","wasm","opfs","indexeddb"],"_resolved":"/private/tmp/pack-0.0.26/aiao-rxdb-adapter-sqlite-wasm-0.0.26.tgz","_integrity":"sha512-lEoQ5CfgsavXH4sV2dVWNfCAK5G/bq8eiImT1zqF5acIY3UbFqOuZ5vDWWGoVTZ3DetLdU5+Fz5EDkOrFypyCQ==","repository":{"url":"git+https://github.com/aiao-io/rxdb.git","type":"git","directory":"packages/rxdb-adapter-sqlite-wasm"},"_npmVersion":"12.0.2","description":"SQLite WASM adapter with browser persistence for Aiao RxDB.","directories":{},"maintainers":[{"name":"aiao","email":"hero63418@gmail.com"}],"sideEffects":false,"_nodeVersion":"26.7.0","dependencies":{"@aiao/rxdb":"0.0.26","@aiao/utils":"0.0.26","@subframe7536/sqlite-wasm":"^1.3.1","@aiao/rxdb-adapter-sqlite-core":"0.0.26"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"ms":"^2.1.3","@aiao/rxdb-test":"0.0.26","@aiao/rxdb-plugin-sync":"0.0.26","@aiao/rxdb-plugin-history":"0.0.26","@aiao/rxdb-plugin-querycache":"0.0.26"},"peerDependencies":{"comlink":"^4.4.2"},"peerDependenciesMeta":{"comlink":{"optional":true}},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/rxdb-adapter-sqlite-wasm_0.0.26_1790793585660_0.2078733970265092"}}},"time":{"created":"2026-05-20T03:09:09.377Z","modified":"2026-09-30T18:39:45.926Z","0.0.20":"2026-05-20T03:09:09.655Z","0.0.21":"2026-07-18T08:22:15.559Z","0.0.22":"2026-07-31T07:27:02.770Z","0.0.23":"2026-08-03T05:49:42.709Z","0.0.24":"2026-08-11T09:05:10.462Z","0.0.25":"2026-08-14T08:06:15.416Z","0.0.26":"2026-09-30T18:39:45.753Z"},"bugs":{"url":"https://github.com/aiao-io/rxdb/issues"},"license":"MIT","homepage":"https://rxdb.netlify.app/docs/adapters/sqlite-wasm","repository":{"url":"git+https://github.com/aiao-io/rxdb.git","type":"git","directory":"packages/rxdb-adapter-sqlite-wasm"},"description":"SQLite WASM adapter with browser persistence for Aiao RxDB.","maintainers":[{"name":"aiao","email":"hero63418@gmail.com"}],"readme":"# @aiao/rxdb-adapter-sqlite-wasm\n\nRxDB SQLite 适配器，基于 [@subframe7536/sqlite-wasm](https://github.com/subframe7536/sqlite-wasm)。\n\n与 `@aiao/rxdb-adapter-wa-sqlite` 共享 `@aiao/rxdb-adapter-sqlite-core` 中的核心能力；差异在于底层 SQLite WASM 由 subframe 包提供（自定义 wa-sqlite，支持 FTS5 / UPDATE DELETE LIMIT，内置 typesafe VFS 预设）。\n\n## 何时使用\n\n- 需要 subframe 提供的增强 SQLite 特性（UPDATE/DELETE LIMIT）\n- 需要类型安全的 VFS 预设\n- 需要更灵活的 VFS 选择（包括 OPFS FileHandle）\n\n## 与其他 SQLite 适配器对比\n\n| 特性                | sqlite-wasm               | wa-sqlite | sqlite-wasm (官方)      |\n| ------------------- | ------------------------- | --------- | ----------------------- |\n| 底层库              | @subframe7536/sqlite-wasm | wa-sqlite | @sqlite.org/sqlite-wasm |\n| UPDATE/DELETE LIMIT | ✅                        | ❌        | ❌                      |\n| VFS 预设            | 类型安全                  | 手动配置  | 手动配置                |\n| OPFS FileHandle     | ✅                        | ❌        | ✅                      |\n| 包大小              | ~800KB                    | ~500KB    | ~1MB                    |\n\n## 支持的存储（VFS 预设）\n\n| `vfs` 取值   | 说明                                          | 运行环境        |\n| ------------ | --------------------------------------------- | --------------- |\n| `memory`     | 纯内存，`MemoryVFS`                           | 主线程/Worker   |\n| `idb`        | IndexedDB，`IDBBatchAtomicVFS`                | 主线程/Worker   |\n| `idb-memory` | 内存 + IndexedDB 镜像，`IDBMirrorVFS`         | 主线程/Worker   |\n| `opfs`       | OPFS，`OPFSCoopSyncVFS`                       | **必须 Worker** |\n| `fs-handle`  | 本地文件/OPFS FileHandle，`OPFSAnyContextVFS` | 主线程/Worker   |\n\n## 安装\n\n```bash\nnpm install @aiao/rxdb @aiao/rxdb-adapter-sqlite-wasm\n# 或\npnpm add @aiao/rxdb @aiao/rxdb-adapter-sqlite-wasm\n```\n\n走 Worker / SharedWorker（`opfs` 强制要求）时，Worker 文件需要你自己 `import { expose } from 'comlink'`，\n因此还要装 comlink —— 它是本包的**可选 peer 依赖**，严格模式的 pnpm 不会把 core 的传递依赖暴露给你：\n\n```bash\nnpm install comlink\n# 或\npnpm add comlink\n```\n\n## 用法\n\n```ts\nimport { RxDB, SyncType } from '@aiao/rxdb';\nimport { RxDBAdapterSqlite } from '@aiao/rxdb-adapter-sqlite-wasm';\n\nconst rxdb = new RxDB({\n  dbName: 'my-app',\n  entities: [/* 实体类 */],\n  sync: {\n    local: { adapter: 'sqlite-wasm' },\n    type: SyncType.None\n  }\n});\n\nrxdb.adapter('sqlite-wasm', async db => new RxDBAdapterSqlite(db, { vfs: 'idb' }));\n\nawait rxdb.connect('sqlite-wasm');\n```\n\n在 Worker 中运行（`opfs` VFS 必须 Worker）：\n\n```ts\n// sqlite-wasm.worker.ts\nimport { SqliteClient } from '@aiao/rxdb-adapter-sqlite-wasm';\nimport { expose } from 'comlink';\n\nexpose(new SqliteClient());\n```\n\n```ts\n// 主线程：workerInstance 本身即可选择 Worker transport\nrxdb.adapter(\n  'sqlite-wasm',\n  async db =>\n    new RxDBAdapterSqlite(db, {\n      vfs: 'opfs',\n      worker: true,\n      workerInstance: new Worker(new URL('./sqlite-wasm.worker', import.meta.url), { type: 'module' }),\n      workerOwnership: 'client'\n    })\n);\n```\n\n`workerOwnership` 默认是 `caller`：同一个 Worker 可在 `disconnect` 后建立新连接，\n但调用方最终必须执行 `worker.terminate()`。像上例一样在 adapter 工厂内创建 Worker 时，\n应使用 `client`，这样断开或初始化失败都会释放 Comlink 端口并终止线程。\n\n直接调用 `createSqliteClient` 时，先 `await client.disconnect()`，再调用包根入口导出的\n`releaseComlinkProxy(client)`；`RxDBAdapterSqlite` 已在 `disconnect()` 内自动完成代理释放。\n\n## 完整示例\n\n参考 [dev-rxdb-angular](https://github.com/aiao-io/rxdb/tree/main/apps/dev-rxdb-angular) 中的集成示例。\n","readmeFilename":"README.md","keywords":["aiao","rxdb","sqlite","wasm","opfs","indexeddb"]}