MetalORM is a TypeScript-first ORM and SQL query builder for Node.js (v20+) that supports gradual adoption from raw SQL building to full ORM with entities, Unit of Work, and decorators. Version 1.1.11 is currently stable, with active development and monthly releases. Key differentiators: zero `any` types in codebase, AST-driven architecture enabling multi-dialect support (MySQL, PostgreSQL, SQLite, SQL Server), and three abstraction levels (query builder, ORM runtime, decorator entities) that share the same foundation. It ships with TypeScript types and peer dependencies for popular database drivers.
npm install metal-ormNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Defines a table with typed schema, builds a query, and compiles to SQL using MySQL dialect.
Upgrade Node.js to v20 or later.
Always pass table name to @Entity decorator.
Install the required driver: e.g., npm install pg for PostgreSQL.
Use import statement: import { defineTable } from 'metal-orm'; or set 'type': 'module' in package.json.Import col from 'metal-orm' directly.
Call compile(new MySqlDialect()) or appropriate dialect.