Skip to content

Releases: kysely-org/kysely-replication

v0.2.3 - fixed package.json repository url.

02 Jan 09:25
Compare
Choose a tag to compare

Hey πŸ‘‹

Nothing special, just fixed package.json's repository url.

v0.2.2 - removed some files that should not be published

02 Jan 08:45
Compare
Choose a tag to compare

Hey πŸ‘‹

Nothing exciting, just removing some unnecessary files from the published package.

v0.2.1 - added README wait for Propagation section.

30 Dec 11:04
Compare
Choose a tag to compare

Hey πŸ‘‹

This release updates the README file in NPM.

Thanks @Bathlamos!

v0.2.0 - Force execute with specific dialect.

29 Dec 15:11
Compare
Choose a tag to compare

Hey πŸ‘‹

This release allows forcing execution with a specific dialect on the fly.

First, import the force module where you define your db instance:

import 'kysely-replication/force'

It will add the withPrimary and withReplica methods in various places in the
Kysely API.

Force execute on primary:

const users = await db
  .withPrimary()
  .selectFrom('users')
  .selectAll()
  .execute() // executes on primary instead of replica

Force execute on replica:

const users = await db
  .withReplica()
  .insertInto('users')
  .values({ email: '[email protected]', is_verified: false })
  .execute() // executes on a replica instead of primary

You can also provide a specific replica index to override the replica strategy:

const users = await db
  .withReplica(2)
  .insertInto('users')
  .values({ email: '[email protected]', is_verified: false })
  .execute() // executes on replica 2 instead of primary

v0.1.0 - Strategy options are now optional.

29 Dec 01:41
Compare
Choose a tag to compare

Hey πŸ‘‹

Replica strategy options object is now optional.

v0.0.2 - fix `with` mutations not using primary

28 Dec 23:14
Compare
Choose a tag to compare

Hey πŸ‘‹

Fixed a bug with with handling causing mutation queries of the form with insert/delete/update/replace/merge ... select ... to be executed against replicas instead of primary.

v0.0.1 - humble beginnings.

23 Dec 00:52
Compare
Choose a tag to compare

Hey πŸ‘‹

Untested. Use at your own risk.

Full Changelog: https://github.com/kysely-org/kysely-replication/commits/v0.0.1