Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions .changeset/bun-sqlite-dialect.md

This file was deleted.

27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# kysely-bun-sqlite-dialect

## 0.1.0

### Minor Changes

- [`17b69e8`](https://github.com/disaresta-org/kysely-bun-sqlite-dialect/commit/17b69e812445e858c7679154bbc48783352bf5e5) Thanks [@theogravity](https://github.com/theogravity)! - Add `BunSqliteDialect`, a Kysely dialect for Bun's native `bun:sqlite` driver.

Kysely's built-in `SqliteDialect` targets `better-sqlite3` and silently returns
no rows on `bun:sqlite`, because it branches on `Statement.reader`, which Bun
does not have. This dialect uses `Statement.columnNames` instead and drives the
rest of the `bun:sqlite` API natively: prepared-statement caching via
`db.query()`, private cursors for `.stream()`, savepoints, and `deferred` /
`immediate` / `exclusive` transaction behavior.

Documents that Bun ships SQLite with `DQS=3`, so an unresolvable double-quoted
identifier is accepted as a string literal rather than raising `no such column`
as it does under better-sqlite3.

Requires Kysely `>=0.29.0`. Kysely 0.28 is not supported: its connection mutex
lived inside `SqliteDriver` rather than `RuntimeDriver`, so a dialect written
against 0.29 has no lock of its own and parallel transactions interleave on
0.28's single connection.

Declares `engines.bun` only, with no `engines.node`: the published JavaScript
never imports `bun:sqlite` itself, so a Node floor would only make npm and pnpm
warn or fail for consumers over a build-time concern.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "kysely-bun-sqlite-dialect",
"description": "Kysely dialect for Bun's native bun:sqlite driver",
"version": "0.0.0",
"version": "0.1.0",
"type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
Expand Down