# Kysely v0.29.0 — 0.29.0 - Product: Kysely (https://whatsnew.fyi/product/kysely) - Vendor: Kysely - Date: 2026-05-08 - Version: v0.29.0 - Original notes: https://github.com/kysely-org/kysely/releases/tag/v0.29.0 - Permalink: https://whatsnew.fyi/product/kysely/releases/v0.29.0 What's New is an index, not a publisher: every entry below links to the vendor's own release notes, which are the authoritative source. Entries are labelled where they are hand-curated sample data, pre-releases, or drawn from a secondary source such as a developer blog. Reuse: the summaries, labels and curation here are © What's New. Quote freely with attribution and a link back; wholesale republication of the corpus is not permitted — terms: https://whatsnew.fyi/terms. The vendors' own release notes remain their publishers'. --- - **added** — Add `$pickTables` and `$omitTables` compile-time helpers to narrow the database schema view for downstream queries - **added** — Add `ReadonlyKysely` helper type to create compile-time readonly database instances - **added** — Add PGliteDialect for PGlite database support - **added** — Add `supportsMultipleConnections` adapter flag with centralized connection mutex for single-connection adapters - **added** — Enhance `$narrowType` to support nested narrowing and discriminated unions - **added** — Add web standards driven query cancellation support with `signal` parameter and `inflightQueryAbortStrategy` option - **added** — Add `SafeNullComparisonPlugin` to automatically convert equality operators to `is` and `is not` when comparing with null - **added** — Add `shouldParse(value, path)` option to `ParseJSONResultsPlugin` for granular control of JSON parsing using JSON paths - **added** — Add `thenRef` method in `eb.case` for case expressions - **added** — Add `whenRef(lhs, op, rhs)` method in `eb.case` for case expressions - **added** — Add `elseRef` method in `eb.case` for case expressions - **added** — Allow disabling transactions in migrate methods - **added** — Allow explicit undefined in Updateable type for exactOptionalPropertyTypes support - **deprecated** — Deprecate `withTables` in favor of `$pickTables`, `$omitTables`, and `$extendTables Hey 👋 This one's a banger! 💥 💥 💥 We got `$pickTables`, `$omitTables` compile-time helpers to narrow the world view of downstream queries, cutting down on compilation complexity/time while at it! ```ts const results = await db .$pickTables<'person' | 'pet'>() // <----- now `DB` is only { person: {...}, pet: {...} } for following methods. .selectFrom('person') .innerJoin('pet', 'pet.owner_id', 'person.id') .selectAll() .execute() const results = await db .$omitTables<'toy'>() // <----- now `DB` doesn't have a "toy" table description for following methods. .selectFrom('person') .innerJoin('pet', 'pet.owner_id', 'person.id') .selectAll() .execute() ``` We got a new `ReadonlyKysely` helper type that turns your instance into a compile-time readonly instance! ```ts import { Kysely } from 'kysely' import type { ReadonlyKysely } from 'kysely/readonly' export const db = new Kysely({...}) as never as ReadonlyKysely db.selectFrom('person').selectAll() // no problem. db.selectNoFrom(sql`now()`.as('now')) // no problem. db.deleteFrom('person') // compilation error + deprecation! db.insertInto('person').values({...}) // compilation error + deprecation! db.mergeInto('person')... // compilation error + deprecation! db.updateTable('person').set('first_name', 'Timmy') // compilation error + deprecation! sql`...`.execute(db) // compilation error! // etc. etc. ``` We got a brand new PGlite dialect. With it comes a new `supportsMultipleConnections` adapter flag that uses a new centralized connection mutex when `false` - should help simplify all SQLite dialects out here! ```ts import { PGlite } from '@electric-sql/pglite' import { Kysely, PGliteDialect } from 'kysely' const db = new Kysely({ // ... dialect: new PGliteDialect({ pglite: new PGlite(), }), // ... }) ``` We got `$narrowType` supporting nested narrowing and discriminated unions! ```ts db.selectFrom('person_metadata') .select(['discriminatedUnionProfile']) // output type inferred as: // // { // discriminatedUnionProfile: { // auth: // | { type: 'token'; token: string } // | { type: 'session'; session_id: string } // tags: string[] // } // }[] .$narrowType<{ discriminatedUnionProfile: { auth: { type: 'token' } } }>() // output type narrowed to: // // { // discriminatedUnionProfile: { // auth: { type: 'token'; token: string } // tags: string[] // } // }[] .execute() ``` We got web standards driven query cancellation support. Pass an abort `signal` to `execute*` methods and similar. Pick between different inflight query abort strategies - ignore the query, cancel it on the database side or even kill the session on the database side. ```ts import { Kysely, PostgresDialect } from 'kysely' import { Client, ... } from 'pg' const db = new Kysely({ dialect: new PostgresDialect({ // ... controlClient: Client, // optional, for out-of-pool connections for database side query aborts. // ... }) }) const options = { signal: AbortSignal.timeout(3_000) } // throw abort/timeout errors and ignore query reuslts query.execute(options) query.stream(options) sql`...`.execute(db, options) db.executeQuery(compiledQuery, options) // etc. etc. query.execute({ ...options, inflightQueryAbortStrategy: 'cancel query' }) // also cancel query database side query.execute({ ...options, inflightQueryAbortStrategy: 'kill session' }) // also kill session database side ``` We got `SafeNullComparisonPlugin` to flip (in)equality operators to `is` and `is not` when right hand side argument is `null`. ```ts import { Kysely, SafeNullComparisonPlugin } from 'kysely' const db = new Kysely({ // ... plugins: [new SafeNullComparisonPlugin()], // ... }) db.selectFrom('pet') .where( _[Truncated at 4000 characters — full notes: https://github.com/kysely-org/kysely/releases/tag/v0.29.0]_