-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add postgresql adapter for Kysely #307
base: main
Are you sure you want to change the base?
Conversation
|
@marcus-kepler is attempting to deploy a commit to the Curated Tests Team on Vercel. A member of the Team first needs to authorize it. |
Tests on this currently failing due to lack of kysely-org/kysely#456 being officially released. |
Have un-extended the postgresql adapter and implemented the single remaining method in 20d17be which has got tests passing. |
We can't extend the postgresql adapter until kysely-org/kysely#456 is released, as it's not currently fully implementing the interface. Instead copy the single remaining member over for the time being.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great
Can someone explain what I can do to have this working? |
Hey there, getting back to this. We're investigating how much value our Kysely plugin provides versus a community one: https://github.com/seveibar/kysely-neon. Have any of you tried kysely-neon? We're wondering if we should deprecate our own adapter and delegate it to the community. As you can tell, we have not been very active in this issue (apologies), which is why we're wondering if it should be owned by the community. Let us know if https://github.com/seveibar/kysely-neon could work for you, and if not I can re-review this PR. |
I agree with you since the kysely neon is an active project and cover all behaviours that vercel kysely do. Can we ensure that? Otherwise I prefer to mantain current with this fixes that I think that is the only problem. Thanks |
The original problem I had which triggered this change was this error when running migrations as documented in https://kysely.dev/docs/migrations
Which we get because we haven't properly signaled to Kysely that we don't support transactions. The Kysely migrator checks
supportsTransactionalDdl
to decide whether to run migrations in a transaction or not, so this adds that.It also overrides the default migration lock functions from https://github.com/kysely-org/kysely/blob/master/src/dialect/postgres/postgres-adapter.ts to use
pg_advisory_lock
and then unlock withpg_advisory_unlock
since we can't rely on transactions auto-dropping now.Fixes #325