denodrivers / postgres

PostgreSQL driver for Deno
https://denodrivers.github.io/postgres
MIT License
594 stars 95 forks source link

Standardize SQL database interface for TS/JS #476

Open halvardssm opened 6 months ago

halvardssm commented 6 months ago

It's a topic that has been brought up every now and then in the Deno DB community, but as Deno is becoming more stable, supports NPM and Node, and we got JSR, I believe it's time to consolidate and create a db standard SQL interface for TS and JS.

I have created a POC in my repo PR.

Any input and contribution is greatly appreciated and encouraged as it would be best to make this a collaborative effort amongst the database maintainers since they know the pitfalls for the different engines.

The milestones are as follows:

The goal for this is to be able to easily transition between databases and have a familiar interface and usage between them.

Consider the PR as a parent issue to have discussions, and where we can finalize the implementation.

langpavel commented 6 months ago

Nice idea but very hard task!

There is @bartlomieju/postgres at JSR which unfortunately does not look maintained (sorry for that opinion), not connected to this project – no possibility to open discussions nor PRs, feels like closed source :broken_heart: Why @bartlomieju? It may be hard to keep all the responsibility. I know this well, but…

There is great node-postgres (@brianc) (npm:pg) best in town library at that time. I had the honor to work on it. But time for great new language features :heart: and simplifications :rocket: may be here.

And that's not the end. There will be more libraries in time. It's natural.

https://xkcd.com/927/

langpavel commented 6 months ago

BTW @halvardssm some suggestions?

bartlomieju commented 6 months ago

There is @bartlomieju/postgres at JSR which unfortunately does not look maintained (sorry for that opinion), not connected to this project – no possibility to open discussions nor PRs, feels like closed source 💔 Why @bartlomieju? It may be hard to keep all the responsibility. I know this well, but…

The one published to JSR is literally this library.

halvardssm commented 6 months ago

@langpavel jupp, a very hard task indeed,but I think with some collaboration it should be feasible 💪🏻 and yes, feel free do send feedback in the PR.

halvardssm commented 1 month ago

RFC has been created: https://github.com/halvardssm/deno_stdext/pull/6