github kysely-org/kysely 0.26.2

latest releases: 0.27.4, 0.27.3, 0.27.2...
14 months ago
  • Added support for select statements without a from clause. The function is called selectNoFrom. The function name was selected after a lot of discussion. The most natural name would just be select, but new users would find that in a list of autocompletions before selectFrom and naturally use it when trying to create a select from query. This would be especially true for people coming from knex where a select from query is started using a select call. #605
  • Add object variants of and and or functions. Allows easy where(eb => eb.and(object)) filters. #583
  • Add support for tuples. See some examples here. #611
  • Add addPrimaryKeyConstraint for AlterTableBuilder. #639 Thank you @n7olkachev ❤️
  • Add any function to function module. #612
  • Add between method to expression builder. #602
  • Add lit method to expression builder. #600
  • Add multi-column variant of orderBy. #423 Thank you @igalklebanov ❤️

An example of an object and call:

const persons = await db
  .selectFrom('person')
  .selectAll()
  .where((eb) => eb.and({
    first_name: 'Jennifer',
    last_name: eb.ref('first_name')
  }))
  .execute()
select * from "person"
where "first_name" = $1 and "last_name" = "first_name"

Don't miss a new kysely release

NewReleases is sending notifications on new releases.