Skip to content

0.11.4

Compare
Choose a tag to compare
@koskimas koskimas released this 11 Dec 16:04
· 864 commits to master since this release

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',
})