Our great sponsors
-
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.
-
Prisma
Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB
-
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.
-
Knex
A query builder for PostgreSQL, MySQL, CockroachDB, SQL Server, SQLite3 and Oracle, designed to be flexible, portable, and fun to use.
-
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.
-
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.
-
typescript-runtime-type-benchmarks
📊 Benchmark Comparison of Packages with Runtime Validation and TypeScript Support
-
prisma1
Discontinued 💾 Database Tools incl. ORM, Migrations and Admin UI (Postgres, MySQL & MongoDB) [deprecated]
-
benchmark
Discontinued MikroORM vs TypeORM benchmark of CRUD operations on 10k entities (by mikro-orm)
TypeORM unfortunately hasn't been actively-maintained in years. The guy put up this issue: https://github.com/typeorm/typeorm/issues/3267 asking for donations and hasn't really done anything since, including not merging PRs from others who have solved obvious bugs or deficiencies. He also won't appoint any other maintainers, so the project has gone nowhere. I think MikroORM is the "spiritual successor" to TypeORM, although I haven't used it in production. Prisma is definitely heavier and a further abstraction from SQL, but I was a huge fan of the developer experience when I was working with it. I think there's value in strongly-typed database queries+responses and code-first database definitions, so I wouldn't use something like Sequelize or knex on a larger project if I could help it. Most ORMs will let you write raw SQL for the rare cases where your query is super weird or performance tuning is a major factor, and you can type those as one-offs.
Our entire engineering process is happening on GitHub and issues are triaged and prioritized within 1-2 days.
The Quickstart and the ready-to-run examples are great places to start exploring Prisma!
If you want something that scales, go pure SQL. If you want types, I'd recommend something like https://github.com/adelsz/pgtyped, which consumes your SQL statements & gives you types.
The Knex.js docs say they were inspired by Laravel's query builder. I haven't used Knex but it might be worth checking out if you think that's the gold standard!
Might be interesting for you: this dude implemented an Type-safe SQL Language in typescript: https://github.com/codemix/ts-sql. Crazy part? It works.
I had a similar experience with TypeORM. I’ve been playing with MikroORM recently and really enjoy it.
And if you go a step further and take one of the available runtype libraries, you will get additional type-guarantees on JSON columns.
I'm using my own query builder in production with lots of succcess (easy to develop with, fast, flexible enough) but there are quite a few projects in that space that I have listed here. To me the most feature-complete and typesafe-first one seems to be mammoth.
This is not different from back then. There was a Prisma 1 roadmap that was available officially (sadly enough, it was even up for almost one year after you stopped working on Prisma 1). Additionally, github issues were given official timelines and deadlines - and then dropped dead in the air. Not via notice in the issues though. Via a blogpost on a completely different medium. So even today, I get random emails from Prisma issues I subscribed to back in the day with people asking when those features will be completed. These issues are open to this day.
I've used the mikro-orm benchmark repo you can find here: https://github.com/mikro-orm/benchmark and just extended it with prisma2 operations like done with mikro-orm and typeorm in the benchmark repo already.
A major first step towards our goal will happen very soon! We're almost done replacing the HTTP communication beetween the Node.js language layer of Prisma Client with the Rust-based query engine with the N-API. This will allow Prisma Client to directly call into the Rust code without the overhead of HTTP which should substantially speed up all Prisma Client queries already.
That said, its not there yet. It's API is a bit lacking still and runtimes are large as you say. For example, there are no crypto APIs in WASM .NET 5.
Related posts
- Top 6 ORMs for Modern Node.js App Development
- ERDIA: TypeORM entity specification documentation tool
- Which ORM do you use with node for relational databases? What's the difference in using sequalize and something like knex/ bookshelf?
- What are your best Node tips/tricks/discoveries from 2021?
- Prisma ORM: how to use the great database mapping package