Releases: kysely-org/kysely-replication
v0.2.3 - fixed package.json repository url.
Hey π
Nothing special, just fixed package.json's repository url.
v0.2.2 - removed some files that should not be published
Hey π
Nothing exciting, just removing some unnecessary files from the published package.
v0.2.1 - added README wait for Propagation section.
v0.2.0 - Force execute with specific dialect.
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.
Hey π
Replica strategy options object is now optional.
v0.0.2 - fix `with` mutations not using primary
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.
Hey π
Untested. Use at your own risk.
Full Changelog: https://github.com/kysely-org/kysely-replication/commits/v0.0.1