Our great sponsors
-
drizzle-orm
Headless TypeScript ORM with a head. Runs on Node, Bun and Deno. Lives on the Edge and yes, it's a JavaScript ORM too 😅
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
-
postgres
Postgres.js - The Fastest full featured PostgreSQL client for Node.js, Deno, Bun and CloudFlare (by porsager)
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
Prisma
Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB
I myself ran into some issues when I started using drizzle with mysql. They had issues in the way they were handling datetime types. At the time I just used workarounds but then decided to submit a PR since the solution was pretty simple. I just liked drizzle's approach so much that I ended up committing more PRs. At this point, I'm one of the mayor contributors of the library. I think that we have to give some leeway to OSS libraries. Managing OSS is not easy, everybody's issues are important and mayor to them, but there's just so many hours in the day to work for free (or very little). At the end of the day, it's just software prone to have issues.
I've switched to kysely (https://kysely.dev) to just build SQL instead and it's nice to have full SQL access but still be type safe to my schema. Enjoying it so far.
I'd push you to consider using postgres, slonik or similar for database queries. With these libraries, you just write SQL, but they perform input sanitization for you. So you can safely write:
I'd push you to consider using postgres, slonik or similar for database queries. With these libraries, you just write SQL, but they perform input sanitization for you. So you can safely write:
(Instead of the following with pg.)
You can just use prisma for migrations. check out prism-kysely
So is it like Exposed for Kotlin which is a typesafe Kotlin DSL for building sql queries? I’ve been looking for something like this in typescript! https://github.com/JetBrains/Exposed
Worth to look at new preview features in prisma 5.7 (relationJoins & distinct): https://github.com/prisma/prisma/releases/tag/5.7.0