PostgreSQL
drizzle-orm
PostgreSQL | drizzle-orm | |
---|---|---|
57 | 48 | |
11,922 | 19,921 | |
- | 5.2% | |
8.0 | 9.7 | |
7 days ago | 5 days ago | |
JavaScript | TypeScript | |
MIT License | Apache License 2.0 |
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.
PostgreSQL
-
Neon Is Generally Available: Serverless Postgres
pg doesn't do too well with serverless, dead connections are left in the pool (or something)
https://github.com/brianc/node-postgres/issues/2112
-
NodeJS Security Best Practices
If you don't want to use ORM then there are some other packages as well! For PostgreSQL we have node-postgres
-
Building Secure Neon-Infused Web Apps with Auth0, Express, and EJS
Interface with PostgreSQL database
-
Drizzle is just as unready for prime-time as Prisma, what else is there?
(Instead of the following with pg.)
-
Nile, Serverless Postgres for Modern SaaS
So far every JS framework that uses https://node-postgres.com works great and so no reason to think Drizzle wouldn't.
-
We migrated to SQL. Our biggest learning? Don't use Prisma
One thing that keeps coming up is that SQL equals low productivity. I don't think this is true. I think the culprit is that most developers are using to heavily abstracting SQL using ORMs like Prisma that hides the database and SQL logic.
Since building a SQL generator (https://aihelperbot.com) as a side project, I have become much more proficient in SQL and even though I am also locked into Prisma, I use the `queryRaw` all the time to execute raw SQL queries. You can understand the code without knowing Prisma API. It is more performant. For more complex SQL queries, I use the SQL generator for initial suggestions and adapt if needed.
For the next projects I build I want to use the minimal Postgres client (https://github.com/brianc/node-postgres) combined with a lightweight migration library.
-
Using AI I have departed from ORM and embraced SQL
For newer projects I use the small Postgres client. Initially my leap into SQL was lead by AI but as I refreshed and relearned SQL, I now use a mixture of AI and self-written SQL queries. Something like this is just easier to have AI do the grunt work and then adjustment as needed.
-
Credentials Leak with Knex
This was a known issue for pg developers, and they managed to fix it a long time ago (at the pg level), but the knowledge of this problem didn't reach Knex maintainers.
-
Why SQL is right for Infrastructure Management
Integrate the database into your application itself with a postgres client library allowing your applications to make infrastructure changes (like provisioning sharded resources for a client that wants isolation, or using a more accurate forecasting model to pre-allocate more resources before the storm hits).
-
What is your development stack for 2023?
node-postgres (raw sql, without ORM)
drizzle-orm
-
A Software Engineer's Tips and Tricks #1: Drizzle
Enter Drizzle, a lightweight typesafe ORM for TypeScript that comes with one promise: If you know SQL — you know Drizzle.
-
Get started with Drizzle ORM and Xata's Postgres service
Drizzle ORM is a very popular TypeScript ORM that provides type safe access to your database, automated migrations, and a custom data model definition.
-
Shape Typing in Python
> being able to have a completely typesafe ORM such as Drizzle (https://orm.drizzle.team/) feels like a Rubicon moment, and touching anything else feels like a significant step backwards.
Alright, but there's nothing stopping you from having a completely typesafe ORM in python, is there?
Sure, there's isn't really one that everyone uses yet, but the python community tends to be a bit more cautious and slower to adopt big changes like that.
-
Don't use your ORM entities for everything – embrace the SQL
Drizzle [1] comes pretty close the last time I checked.
[1]: https://orm.drizzle.team
-
I Deployed My Own Cute Lil’ Private Internet (a.k.a. VPC)
Each app’s front end is built with Qwik and uses Tailwind for styling. The server-side is powered by Qwik City (Qwik’s official meta-framework) and runs on Node.js hosted on a shared Linode VPS. The apps also use PM2 for process management and Caddy as a reverse proxy and SSL provisioner. The data is stored in a PostgreSQL database that also runs on a shared Linode VPS. The apps interact with the database using Drizzle, an Object-Relational Mapper (ORM) for JavaScript. The entire infrastructure for both apps is managed with Terraform using the Terraform Linode provider, which was new to me, but made provisioning and destroying infrastructure really fast and easy (once I learned how it all worked).
-
Exploring Astro DB
It's just SQL so you can take it out at any moment and move to any other DB provider. The package for working with Astro DB, @astrojs/db, includes Drizzle ORM so migration to a different provider should be relatively painless
- ORMs are nice but they are the wrong abstraction
- Drizzle TypeScript ORM
-
Basic analytics with Vercel Postgres, Drizzle & Astro
Since Vercel's analytics pricing is a bit too expensive for my use case (where I hit the limit of 2,500 requests per month), and I didn't like using Google Analytics (not a big fan of Google), I decided to build my own analytics dashboard. Databases was something I didn't work with much before directly, so I decided to use an ORM, Drizzle, which is quite lightweight and easy to use.
-
Edge Functions: Node and native NPM compatibility
do yourself a favor and ditch Prisma. It's a bloody mess of a project and codebase. I recommend https://github.com/drizzle-team/drizzle-orm to anyone that'll listen.
What are some alternatives?
Prisma - Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB
kysely - A type-safe typescript SQL query builder
MySQL - A pure node.js JavaScript Client implementing the MySQL protocol.
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.
MikroORM - TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, MariaDB, MS SQL Server, PostgreSQL and SQLite/libSQL databases.
MongoDB - The official MongoDB Node.js driver
knex-tree - Query hierarchical data structures in sql with knex
Aerospike - Node.js client for the Aerospike database
MongoDB - The MongoDB Database
Redis - 🚀 A robust, performance-focused, and full-featured Redis client for Node.js.
hono - Web Framework built on Web Standards