TypeORM is an ORM (Object-Relational Mapper) for TypeScript and JavaScript that runs in NodeJS, Browser, Cordova, Ionic, React Native, NativeScript, Expo, and Electron platforms. It supports both DataMapper and ActiveRecord patterns and works with multiple databases including MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, MongoDB, CockroachDB, Google Spanner, and SAP HANA. It provides features such as a QueryBuilder, entity decorators, and database migrations.
What it's for
Defining database entities with TypeScript decoratorsBuilding complex queries with joins, pagination, and cachingGenerating and running database migrationsWorking with multiple data sources, databases, schemas, and replication setupsModeling tree structures using Adjacency list or Closure table patternsValidating entity data using class-validatorWriting parameterized SQL queries via the SQL Tag
Features 15
- Cross-platform: Node.js, browsers, mobile, and desktop apps
- Embedded entities for composition over inheritance
- Entity decorators for defining models
- Entity inheritance (Concrete Table Inheritance)
- First-class migrations support with automatic generation
- Full TypeScript type safety for database models
- Multi-database support (MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, MongoDB, CockroachDB, Google Spanner, SAP HANA)
- Multiple data sources, databases, schemas, and replication setup
- Powerful QueryBuilder with joins, pagination, and caching
- SQL Tag for template-literal SQL queries with automatic parameter handling
- Supports both DataMapper and ActiveRecord patterns
- Tree entities using Adjacency list and Closure table patterns
- Usage with both TypeScript and JavaScript
- Validation support via class-validator
- View entities
Similar apps
SequelizeOpen sourceFeature-rich ORM for modern TypeScript & JavaScriptPriceNot statedTry freeFree planRuns on—Features14
MikroORMOpen sourceTypeScript ORM built on proven patternsPriceNot statedTry free—Runs on—Features15
Drizzle ORMnext gen TypeScript ORM.PriceNot statedTry free—Runs on—Features20
PrismaOpen sourceAgent Infrastructure for TypeScriptPriceUsage-basedTry freeFree planRuns onWebFeatures20
Prisma Data PlatformA modern ORM with a fully managed Postgres database.PriceNot statedTry freeFree planRuns onWebFeatures5
Hibernate ORMOpen sourceYour relational data. Objectively.PriceNot statedTry free—Runs on—Features16