-
Notifications
You must be signed in to change notification settings - Fork 7
Releases: kysely-org/kysely-postgres-js
v3.0.0
Hey 👋
We're back babyyyy! 🍻
We're no longer coupled to postgres's types - this means, no annoyances (I hope) in Deno, and you can pass Bun's SQL instances as config.postgres.
config.postgres also accepts factories now.
A new config.onReserveConnection hook.
Bumps to all dependencies. postgres is now an optional peer dependency (because of Bun or any future postgres compatible libraries you wanna use).
Should have savepoint support now that we're extending the core PostgreSQL driver.
Full Changelog: v2.0.0...v3.0.0
Assets 2
v2.0.0
Hey 👋
postgres released version 3.4, and with it the ability to reserve a single connection in the pool.
This means it is 100% aligned with kysely's internals, and this dialect no longer has caveats with single connection executions and transactions.
They work without possibly creating more connection to the database than passed in options max.
Breaking changes:
Now that the dialect no longer has to create pools of 1 as a workaround for the caveats, it can simply accept a postgres instance,
instead of connection options and the postgres function.
Migrating from v1:
-
Install postgres >= 3.4.0
-
Change your instantiation code to look like this:
import {Kysely} from 'kysely' import {PostgresJSDialect} from 'kysely-postgres-js' import postgres from 'postgres' const db = new Kysely<Database>({ dialect: new PostgresJSDialect({ postgres: postgres({ database: 'test', host: 'localhost', max: 10, port: 5434, user: 'admin', }), }), })