theorm is a Node.js MySQL ORM that provides a simple, model-based approach to interacting with MySQL databases. The current stable version is 0.2.13, released as a work-in-progress. It supports a variety of primitive property types (bool, int, char, etc.) with automatic column type mapping and indexing options. Unlike larger ORMs like Sequelize or TypeORM, theorm is lightweight and focuses on MySQL only, with no dependency on TypeScript. It offers built-in search mapping and auto-increment primary key types. The library is still early stage, with limited documentation and community support.
npm install theormNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to define a model with various property types, create a record, and query using primary key find and where clause.
Define 'static fields()' in the class instead of a regular method.
Call await connect(config) at application startup.
Explicitly set default_value or use specific type variants.
Avoid using string_key; use separate primary key with char instead.
Ensure class extends Model and call connect() before any find operation.
Add await connect(config) at the beginning of your application.
Use import { type } from 'theorm' or const { type } = require('theorm').