Skip to content

Releases: kysely-org/kysely

0.28.10

18 Jan 07:13
Immutable release. Only release title and notes can be modified.
v0.28.10
09275f3

Choose a tag to compare

Hey πŸ‘‹

A small batch of bug fixes. Please report any issues. 🀞😰🀞

πŸš€ Features

🐞 Bugfixes

  • Add ExtractColumnType and DrainOuterGeneric type exports by @mifi in #1679
  • fix: $narrowType compilation errors when composite: true. by @igalklebanov in #1681
  • fix: executeTakeFirst compilation error when composite. by @igalklebanov in #1683
  • fix: with/withRecursive compilation errors when composite. by @igalklebanov in #1684

PostgreSQL 🐘 / MSSQL πŸ₯…

  • fix: Migrator attempts to create custom migration schema even if it exists and fails on dialects that don't support if not exists. by @austin-hall-skylight in #1608

PostgreSQL 🐘 / SQLite πŸ“˜

πŸ“– Documentation

πŸ“¦ CICD & Tooling

⚠️ Breaking Changes

🐀 New Contributors

Full Changelog: v0.28.9...v0.28.10

0.28.9

13 Dec 17:48
Immutable release. Only release title and notes can be modified.
v0.28.9
44e578d

Choose a tag to compare

Hey πŸ‘‹

A small batch of bug fixes. Please report any issues. 🀞😰🀞

πŸš€ Features

🐞 Bugfixes

PostgreSQL 🐘

  • fix: withSchema not applying for delete query using clause. by @igalklebanov in #1648
  • fix: withSchema adds schema to for update|share|key share|no key share of tables causing database errors. by @igalklebanov in #1659

πŸ“– Documentation

πŸ“¦ CICD & Tooling

⚠️ Breaking Changes

🐀 New Contributors

Full Changelog: v0.28.8...v0.28.9

0.28.8

09 Oct 21:47
v0.28.8
4daed49

Choose a tag to compare

Hey πŸ‘‹

A small batch of bug fixes. Please report any issues. 🀞😰🀞

πŸš€ Features

🐞 Bugfixes

PostgreSQL 🐘

  • fix: filter schemas the current user does not have access to in postres introspector by @chanon in #1550
  • fix: insert/update not being wrapped in parens when in CTE of a merge query. by @igalklebanov & @msifd in #1611

πŸ“– Documentation

πŸ“¦ CICD & Tooling

⚠️ Breaking Changes

🐀 New Contributors

Full Changelog: v0.28.7...v0.28.8

0.28.7

14 Sep 15:37

Choose a tag to compare

Hey πŸ‘‹

A small batch of bug fixes. Please report any issues. 🀞😰🀞

πŸš€ Features

🐞 Bugfixes

  • fix: unexported dynamic builders resulting in ts(2742) when composite: true. by @igalklebanov in #1578
  • fix(ExpressionBuilder): improper custom operator support in eb(). by @igalklebanov in #1579
  • fix(TransactionBuilder): auto rollback only if transaction begun. by @igalklebanov in #1580

πŸ“– Documentation

πŸ“¦ CICD & Tooling

⚠️ Breaking Changes

🐀 New Contributors

Full Changelog: v0.28.6...v0.28.7

0.28.6

13 Sep 10:59

Choose a tag to compare

Hey πŸ‘‹

A small batch of bug fixes. Please report any issues. 🀞😰🀞

Docs site has been optimized and all we got was this animation:

image

πŸš€ Features

🐞 Bugfixes

PostgreSQL 🐘 / MSSQL πŸ₯…

MySQL 🐬

πŸ“– Documentation

πŸ“¦ CICD & Tooling

⚠️ Breaking Changes

🐀 New Contributors

Full Changelog: v0.28.5...v0.28.6

0.28.5

10 Aug 18:22

Choose a tag to compare

Hey πŸ‘‹

A small batch of bug fixes. Please report any issues. 🀞😰🀞

πŸš€ Features

🐞 Bugfixes

  • fix: Buffer breaking ShallowDehydrateValue in non-Node.js TypeScript environments. by @igalklebanov in #1542.

πŸ“– Documentation

πŸ“¦ CICD & Tooling

⚠️ Breaking Changes

🐀 New Contributors

Full Changelog: v0.28.4...v0.28.5

0.28.4

02 Aug 01:21

Choose a tag to compare

Hey πŸ‘‹

A small batch of bug fixes. Please report any issues. 🀞😰🀞

πŸš€ Features

🐞 Bugfixes

  • fix: ShallowDehydrateValue mishandles null & undefined, and bigint / numeric strings. by @igalklebanov in #1529
PostgreSQL 🐘
  • Fix fn.any to support ColumnType references by @Ruthenz in #1521

πŸ“– Documentation

πŸ“¦ CICD & Tooling

⚠️ Breaking Changes

🐀 New Contributors

Full Changelog: v0.28.3...v0.28.4

0.28.3

18 Jul 01:17

Choose a tag to compare

Hey πŸ‘‹

A small batch of bug fixes. Please report any issues. 🀞😰🀞

πŸš€ Features

CockroachDB 🟣
  • fix: filter out internal cockroachdb schemas in postgres introspector by @yawhide in #1459

🐞 Bugfixes

  • fix(Migrator): NO_MIGRATIONS comparison fails in dup Kysely scenarios. by @igalklebanov in #1475
  • Fix Kysely<any> type errors with narrow table name types by @koskimas in #1443
  • fix AsyncDisposable usage erroring for older TypeScript versions. by @igalklebanov in #1507
  • fix(helpers): JSON helpers' return types incorrectly have Dates and other JS/Node-native instances that require data type metadata. by @igalklebanov in #1477
MySQL 🐬 / MS SQL Server πŸ₯…
  • fix: bigint immediates are appended as string literals instead of numbers. by @igalklebanov in #1445
MS SQL Server πŸ₯…

πŸ“– Documentation

πŸ“¦ CICD & Tooling

⚠️ Breaking Changes

🐀 New Contributors

Full Changelog: 0.28.2...v0.28.3

0.28.2

24 Apr 10:32

Choose a tag to compare

Hey πŸ‘‹

v0.28 broke an undocumented TypeScript behavior our API had that allowed you to pass table name unions to query builders and enable some DRYing of queries. Seeing that this pattern was quite popular, we decided to support it officially with the addition of the table method in the dynamic module.

You can pull off some crazy complex stuff like:

async function getRowByColumn<
  T extends keyof Database,
  C extends keyof Database[T] & string,
  V extends SelectType<Database[T][C]>,
>(t: T, c: C, v: V) {
  // We need to use the dynamic module since the table name
  // is not known at compile time.
  const { table, ref } = db.dynamic

  return await db
    .selectFrom(table(t).as('t'))
    .selectAll()
    .where(ref(c), '=', v)
    // `id` can be directly referenced since every table has it.
    .orderBy('t.id')
    .executeTakeFirstOrThrow()
}

const person = await getRowByColumn('person', 'first_name', 'Arnold')

...and it'll narrow the downstream query context to the intersection of all the possible shapes of tables in the union type. (DONT DO THIS AT HOME KIDS!)

A simpler example would be:

async function deleteItem(id: string, table: 'person' | 'pet') {
  await db
    .deleteFrom(db.dynamic.table(table).as('t'))
    .where('id', '=', id)
    .executeTakeFirstOrThrow()
}

If you attempt to refer to a column that doesn't exist in both "person" and "pet" (e.g. "pet"'s "species" column), the compiler will correctly yell at you.

πŸš€ Features

  • Add table to DynamicModule for dynamic table references by @koskimas in #1434

🐞 Bugfixes

SQLite πŸ“˜
  • fix: SQLite's introspector is printing deprecation errors for orderBy(array). by @igalklebanov in #1435

πŸ“– Documentation

πŸ“¦ CICD & Tooling

⚠️ Breaking Changes

🐀 New Contributors

Full Changelog: 0.28.1...0.28.2

0.28.1

19 Apr 10:41

Choose a tag to compare

Hey πŸ‘‹

Just a small crucial bug fix release. Please inform us if you see any more regressions since v0.28. πŸ™

πŸš€ Features

🐞 Bugfixes

PostgreSQL 🐘
  • pg introspector - Wrap schema.table in double quotes for case handling by @neil176 in #1426

πŸ“– Documentation

πŸ“¦ CICD & Tooling

⚠️ Breaking Changes

🐀 New Contributors

Full Changelog: 0.28.0...0.28.1