kysely-wasm
v0.7.0
Published
kysely dialect for various sqlite wasm
Downloads
1,277
Maintainers
Readme
kysely-wasm
kysely dialect for various SQLite wasm
no wasm denpendencies, your need to install yourself
Install
pnpm add -D kysely kysely-wasm
Introduce
there are 6 dialects
- SqlJsDialect: dialect for sql.js
- OfficialWasmDialct: dialect for official wasm build
- NodeWasmDialct: dialect for node sqlite3 wasm
- EmptyDialect: only for sql generation, no backend
- CrsqliteDialect: dialect for vlcn.io/wasm ~~- WaSqliteDialect: dialect for wa-sqlite~~
Differences
SqlJsDialect
: easy to use
you can get total buffer on every sql execution except select
and no backend storage
- no support for bigint
OfficialWasmDialect
: performance
you can choose to use OPFS as backend storage(for some vfs, your server must response COOP and COEP in header, see doc), which is recommended officially (see this and this) and only work in WebWorker.
WaSqliteDialect
: polyfill
deprecated, you can choose to use worker dialect
NodeWasmDialect
: no compile
you can choose to use native file system
as backend storage, which is no need to recompile for different platform
CrsqliteDialect
: CRDT
you can choose to use IndexedDB
as backend storage
Type
see in jsdoc
Usage and more details
see test and playground