Releases: evan-brass/sqlite.js
v0.14.0 The "You can reopen file picker files!" release
The file picker VFS now stores opened file handles into an indexeddb so that you can re-open them later using a filename like filehandle:[handle number]. In order for you to know what the file handle is, the picker VFS calls showOpenFilePicker (or save picker) from inside the full_pathname function and puts filehandle:[handle number] into the filename struct. You can retrieve the filename for the databases in a connection using Conn.filename(db_name).
There's now also Conn.vfs(db_name) and Conn.file(db_name) to retrieve the javascript VFS or File implementations. This could maybe be helpful as an alternative to creating custom file_contol opcodes or custom pragmas.
v0.10.0 The "Well crap, I guess I need a Conn class anyway" release
I wasn't supposed to be doing this, I was supposed to be writing the HTTP VFS module... but I needed to test various arguments to sqlite3_open_v2 and that lead to wanting to change the connection mid-sql and etc. etc.
So now you can open a new connection (closing any previous one) using:
import { Conn, open, exec } from 'sql.mjs';
const test = new Conn();
await exec(test.sql`${open`file://localhost/test.db?vfs=opfs`}`);By default, new Conn() will open an in-memory database when you first call .sql on it.
v0.9.0 the "There's now two VFSs" release
Added a 'picker' virtual file system that can show either the save file dialog or the open file dialog. You can now edit local database files, however journaling isn't supported (since we can't create a file relative to a file handle). You'll want to set PRAGMA journal_mode = MEMORY; or PRAGMA journal_mode = OFF when using this VFS.
Future work will be to add a wrapper around the online-backup API so that you can save in-memory databases through this new picker VFS. (Technically it should already be possible to do, but likely not ergonomic / javascript-y)
v0.6.0 - The "starting to be usable...maybe?" release
Adds support for incremental blob io via JS ReadableStream and WritableStream. This should make it relatively easy to upload files directly to a database (store in OPFS or memory).
Adds a connection pool implementation.
The 1/2 release
Just pushing code around to different files mainly.
Other notables:
- Removed AsObject. Now rows are returned via a row object which has columns stored as properties, but is also iterable. This means that you can use either object or array destructuring to get the fields from a row.
- Made a new sqlite.mjs file which re-exports the wasm exports, and adds a few helper functions. Since asyncify.mjs already stubs imports, it's optional to include vfs.mjs. If you only need memory databases, and you don't need random/date/sleep functionality, then you can skip importing vfs.mjs.
- Removed base classes in vfs.mjs
v0.3.1 - The "I kinda have something working" release
Main goal here was to have a demo page that's halfway sort-kinda decent.
No improvements on custom functions, but slightly refactored the argument / parameter binding.
v0.1.0
#Version 0.1.0 - The "How do I publish something" release