github kysely-org/kysely 0.14.0

latest releases: 0.27.3, 0.27.2, 0.27.1...
2 years ago

Breaking changes

  • All expression methods in the schema module previously took a raw SQL string. Those all now take a db.raw instance instead for consistency.
// Before
db.schema
  .alterTable('person')
  .addCheckConstraint('some_constraint', 'a < b')

// Now
db.schema
  .alterTable('person')
  .addCheckConstraint('some_constraint', db.raw('a < b'))
  • onConflictDoNothing and onConflictUpdate methods have been replaced by a single onConflict method.
// Before
db.insertInto('pet').values(pet).onConflictUpdate('name', updates)

// Now
db.insertInto('pet').values(pet).onConflict(
  // Also see the `columns` and `constraint` methods.
  (oc) => oc.column('name').doUpdateSet(updates)
)
// Before
db.insertInto('pet').values(pet).onConflictDoNothing('name')

// Now
db.insertInto('pet').values(pet).onConflict(
  (oc) => oc.column('name').doNothing()
)

Don't miss a new kysely release

NewReleases is sending notifications on new releases.