Skip to content

Releases: kysely-org/kysely

0.12.1

16 Dec 11:46

Choose a tag to compare

Make jsdoc comments better accessible by copying them from the interfaces to the implementing classes. This is done automatically as a build step.

0.12.0

16 Dec 05:12

Choose a tag to compare

Breaking changes

  • Renamed the subQuery method to selectFrom.
  • Created separate query builders for select, insert, update and delete queries. This is only a breaking change if you have used the QueryBuilder type explicitly.

0.11.4

11 Dec 16:04

Choose a tag to compare

Support callback subqueries and raw expressions in insert queries:

db.with('jennifer', (db) => db
  .selectFrom('person')
  .where('first_name', '=', 'Jennifer')
  .select(['id', 'first_name'])
  .limit(1)
).insertInto('pet').values({
  id: db.generated,
  owner_id: (eb) => eb.subQuery('jennifer').select('id'),
  name: (eb) => eb.subQuery('jennifer').select('first_name'),
  species: 'cat',
})

0.11.3

11 Dec 13:17

Choose a tag to compare

Support custom log function:

const db = new Kysely<Database>({
  dialect: new PostgresDialect(postgresConfig),
  log(event) {
    if (event.level === 'query') {
      console.log(event.query.sql)
      console.log(event.query.parameters)
    }
  }
})

0.11.2

11 Dec 12:04

Choose a tag to compare

Accept a single raw argument in where, having and on statements. For example

where(db.raw('foo between ? and ?', [a, b]))

0.11.1

10 Dec 09:28

Choose a tag to compare

Implement SQLite introspector.

0.11.0

09 Dec 13:30

Choose a tag to compare

Added support for SQLite using the better-sqlite3 library.

Breaking changes

  • insert queries now return an InsertResult instead of number | undefined
  • update queries now return an UpdateResult instead of number
  • delete queries now return a DeleteResult instead of number
  • Number fields in QueryResult are now of type bigint to support large integers. Also the QueryResult. insertedPrimaryKey field has been renamed to insertId. QueryResult is only returned by completely raw queries like await db.raw('select * from person').

0.10.1

06 Dec 18:49

Choose a tag to compare

Use performance.now instead of process.hrtime to time query execution.

0.10.0

05 Dec 10:06

Choose a tag to compare

Breaking changes

  • increments method in the schema module is now called autoIncrement. You need to go through your migrations and use the new method.
  • Harmonised operation node flag names. Booleans like isPrimaryKey are now renamed to primaryKey. This only affects you if you've implemented your own plugins that transform the operation node tree.

0.9.9

04 Dec 14:31

Choose a tag to compare

Added createView and dropView methods to the schema module.