typed-knex
pg-promise
Our great sponsors
typed-knex | pg-promise | |
---|---|---|
1 | 17 | |
113 | 3,415 | |
- | - | |
0.0 | 5.8 | |
about 1 year ago | 8 days ago | |
TypeScript | JavaScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
typed-knex
-
DenoDB
This has been an issue for me as well. I created https://github.com/wwwouter/typed-knex to mitigate this. At first I had to do a lot of weird things, but with the evolution of TypeScript, it is getting more and more like 'normal' Knex.js. The end goal is to be nothing more than a very small wrapper, if any.
pg-promise
-
Planning projects ? Looking for help
Personally with more time I would also use JavaScript so I can improve it. Last time I wrote something with Express and a database connection is a long time ago and not for work, only for my personal testing. But for JavaScript database connection to PostgreSQL I recommend pg-promise. That works like a charm.
-
Ask HN: Why are so many PHP projects moving to Node?
I've always loved this project / product:
https://github.com/outline/outline
I think the guy who built it posts here. There's also pg-promise, a "Postgres interface for Node.js":
https://github.com/vitaly-t/pg-promise
-
Which ORM do you prefer with nodejs/Typescript project and why ?
Raw pgPromise with string templating.
-
Is my health check endpoint good enough?
i do have a couple of them like websocket server using ws, bullmq for sending emails and postgres listen/notify to push data to websocket clients. Would you happen to have any ideas on how to go about these? I did some research
-
Help seeding a database with PG
Yes. You can also take at the pg-promise library. https://github.com/vitaly-t/pg-promise
-
What package do you guys use for postgres in node js?
Is there any difference to the named parameters already supported? https://github.com/vitaly-t/pg-promise#named-parameters
-
DenoDB
During my years as a dev i have really started to dislike ORMs. They always fail in the end. SQL is universal, and transfers between languages and tech fields. This is why im pro-sql, and always try to avoid unnecessary abstractions.
I have actually went back to writing pure SQL in files, and using those as params for whatever db engine i use, this makes it even possible to reuse the code in other projects (even its unlikely that you can use the exact same query, but just as a "it would work" in theory).
For node based projects i have used and would probably still choose pg-promise (https://github.com/vitaly-t/pg-promise).
-
How to use PostgreSQL with Node?
Since I'm decent at writing SQL queries and I don't want to learn additional syntax to work with ORMs/query builders, I stay as close as possible to the database driver. pg-promise is an excellent library built on top of the Node.js driver for PostgreSQL. It's built with promises in mind, it's well-tested and typed.
-
5 reasons to use MongoDB as a bootstrapper
dont believe me? look at how many open issues they have https://github.com/vitaly-t/pg-promise/issues
-
Building a SaaS in one week: How I built OnlineOrNot (Next.js/React, Tailwind, GraphQL, TypeScript)
I just used pg-promise - it handles the connections for you, up to you to write the SQL.
What are some alternatives?
trpc - 🧙♀️ Move Fast and Break Nothing. End-to-end typesafe APIs made easy.
Knex - A query builder for PostgreSQL, MySQL, CockroachDB, SQL Server, SQLite3 and Oracle, designed to be flexible, portable, and fun to use.
nestjs-objection - NestJS module for Objection
TypeORM - ORM for TypeScript and JavaScript. Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, SAP Hana, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.
denodb - MySQL, SQLite, MariaDB, PostgreSQL and MongoDB ORM for Deno
Sequelize - Feature-rich ORM for modern Node.js and TypeScript, it supports PostgreSQL (with JSON and JSONB support), MySQL, MariaDB, SQLite, MS SQL Server, Snowflake, Oracle DB (v6), DB2 and DB2 for IBM i.
slonik - A Node.js PostgreSQL client with runtime and build time type safety, and composable SQL.
postgres - Postgres.js - The Fastest full featured PostgreSQL client for Node.js, Deno, Bun and CloudFlare
node-sql-template-strings - ES6 tagged template strings for prepared SQL statements 📋
Mongoose - MongoDB object modeling designed to work in an asynchronous environment.