kysely-org / kysely

A type-safe typescript SQL query builder
https://kysely.dev
MIT License
10.8k stars 275 forks source link

[Question] Is it possible to support for Postgres.js as built-in PostgreSQL dialect driver? #691

Closed lulunananaluna closed 1 year ago

lulunananaluna commented 1 year ago

My understanding is that postgres is also a decent alternative for pg, however there is no built-in dialect / driver for it.

There is some cool work here at igalklebanov/kysely-postgres-js and https://github.com/porsager/postgres/issues/603.

Is it possible to have it as a built-in? Or is it better to be left-out as an external dialect?

Thank you!

koskimas commented 1 year ago

We don't see any reason to support two Postgres drivers in the core.

lulunananaluna commented 1 year ago

You're right I agree, sorry for the silly suggestion :laughing:

How about a reason to replace the existing built-in driver with a better one?

Could it break things?

koskimas commented 1 year ago

If someone writes a driver that's better in some meaningful way, we will consider it.

igalklebanov commented 1 year ago

@lulunananaluna

Hey 👋

Postgres.js has no single connection getter. Kysely needs it. There's a PR/branch inplementing it, but porsager has been busy as of late and its not released yet. So even if we wanted to add the dialect to Kysely's core, we can't.

I'm a Kysely member, and maintain this community dialect btw. What are your concerns with it not being in Kysely's core?