TypeORM - it's not what you think.

This page summarizes the projects mentioned and recommended in the original post on /r/typescript

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • 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.

  • 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.

  • Prisma

    Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB

  • Our entire engineering process is happening on GitHub and issues are triaged and prioritized within 1-2 days.

  • 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.

    SurveyJS logo
  • prisma-examples

    🚀 Ready-to-run Prisma example projects

  • The Quickstart and the ready-to-run examples are great places to start exploring Prisma!

  • pgtyped

    pgTyped - Typesafe SQL in TypeScript

  • 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.

  • Knex

    A query builder for PostgreSQL, MySQL, CockroachDB, SQL Server, SQLite3 and Oracle, designed to be flexible, portable, and fun to use.

  • 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!

  • ts-sql

    A SQL database implemented purely in TypeScript type annotations.

  • 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.

  • 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.

  • I had a similar experience with TypeORM. I’ve been playing with MikroORM recently and really enjoy it.

  • 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.

    WorkOS logo
  • typescript-runtime-type-benchmarks

    📊 Benchmark Comparison of Packages with Runtime Validation and TypeScript Support

  • And if you go a step further and take one of the available runtype libraries, you will get additional type-guarantees on JSON columns.

  • typesafe-query-builder

    Generate SQL queries leveraging type inference and Postgres Json functions

  • 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.

  • prisma1

    Discontinued 💾 Database Tools incl. ORM, Migrations and Admin UI (Postgres, MySQL & MongoDB) [deprecated]

  • 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.

  • benchmark

    Discontinued MikroORM vs TypeORM benchmark of CRUD operations on 10k entities (by mikro-orm)

  • 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.

  • napi-rs

    A framework for building compiled Node.js add-ons in Rust via Node-API

  • 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.

  • .NET Runtime

    .NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.

  • 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.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts