Mythix ORM (v1.15.0) is a modular, extensible Node.js ORM supporting SQLite and PostgreSQL with plans for MongoDB and MySQL. Its key differentiators include a unified query engine across SQL and NoSQL databases, a clean model system with no hidden auto-magic, and deliberate design for extension via plugins and custom drivers. It offers full-feature parity with other ORMs (validation, hooks, relations, transactions) while staying slim and framework-agnostic. Release cadence is active but early-stage; ship stable with node >=18.0.0 and TypeScript definitions.
npm install mythix-ormNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Defines a User model with XID primary key, creates table, saves and retrieves a record using SQLite.
Upgrade Node.js to 18.0.0 or later.
Replace import mythixOrm from 'mythix-orm' with import { Model, Types } from 'mythix-orm'.Always use the Types object for field types, e.g., type: Types.STRING(128).
Add primaryKey: true to the field definition you want as primary key.
Run npm install mythix-orm-sqlite (or your chosen driver) alongside mythix-orm.
Use import { Model } from 'mythix-orm' or const { Model } = require('mythix-orm').Install the driver: npm install mythix-orm-sqlite
Set allowNull: false on required fields or provide a value.
Use Types.XID() (with parentheses) to create the type instance.