{"id":41564,"library":"mythix-orm","title":"Mythix ORM","description":"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.","status":"active","version":"1.15.0","language":"javascript","source_language":"en","source_url":"https://github.com/th317erd/mythix-orm","tags":["javascript","orm","mysql","postgres","postgresql","mssql","mongo","snowflake","database","typescript"],"install":[{"cmd":"npm install mythix-orm","lang":"bash","label":"npm"},{"cmd":"yarn add mythix-orm","lang":"bash","label":"yarn"},{"cmd":"pnpm add mythix-orm","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"SQLite driver required for SQLite support; separate package.","package":"mythix-orm-sqlite","optional":true}],"imports":[{"note":"Default export is not available; named import is required.","wrong":"const Model = require('mythix-orm').Model","symbol":"Model","correct":"import { Model } from 'mythix-orm'"},{"note":"Types is a named export, not a default. In CJS, use const { Types } = require('mythix-orm').","wrong":"const { Types } = require('mythix-orm').default","symbol":"Types","correct":"import { Types } from 'mythix-orm'"},{"note":"SQLiteConnection is a named export from the driver package, not default.","wrong":"const SQLiteConnection = require('mythix-orm-sqlite')","symbol":"SQLiteConnection","correct":"import { SQLiteConnection } from 'mythix-orm-sqlite'"}],"quickstart":{"code":"const { Model, Types } = require('mythix-orm');\nconst { SQLiteConnection } = require('mythix-orm-sqlite');\n\nclass User extends Model {\n  static fields = {\n    id: {\n      type: Types.XID(),\n      defaultValue: Types.XID.Defaults.XID,\n      allowNull: false,\n      primaryKey: true,\n    },\n    email: {\n      type: Types.STRING(128),\n      allowNull: false,\n      index: true,\n      unique: true,\n    },\n    firstName: {\n      type: Types.STRING(64),\n      allowNull: false,\n      index: true,\n    },\n    lastName: {\n      type: Types.STRING(64),\n      allowNull: false,\n      index: true,\n    },\n  };\n}\n\n(async () => {\n  const connection = new SQLiteConnection({ models: [User] });\n  await connection.start();\n  await connection.createTables([User]);\n\n  const user = new User({ email: 'test@example.com', firstName: 'Test', lastName: 'User' });\n  await user.save();\n\n  const loaded = await User.findOne({ where: { email: 'test@example.com' } });\n  console.log(loaded.firstName);\n\n  await connection.stop();\n})();","lang":"javascript","description":"Defines a User model with XID primary key, creates table, saves and retrieves a record using SQLite."},"warnings":[{"fix":"Upgrade Node.js to 18.0.0 or later.","message":"Mythix ORM requires Node.js >=18.0.0. Older versions are unsupported.","severity":"breaking","affected_versions":"<1.0.0"},{"fix":"Replace import mythixOrm from 'mythix-orm' with import { Model, Types } from 'mythix-orm'.","message":"The default export from 'mythix-orm' was removed in v1.0.0. Use named exports instead.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Always use the Types object for field types, e.g., type: Types.STRING(128).","message":"Field definitions must use Types.* constructors (e.g., Types.STRING(128)), not plain constructor calls like String or Number.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Add primaryKey: true to the field definition you want as primary key.","message":"The primary key field must be explicitly marked with primaryKey: true. There is no automatic 'id' field.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Run npm install mythix-orm-sqlite (or your chosen driver) alongside mythix-orm.","message":"Drivers like mythix-orm-sqlite must be installed separately. There is no bundled driver.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'18.0.0':87 'across':30 'activ':78 'agnost':74 'auto':43 'auto-mag':42 'cadenc':76 'clean':36 'custom':53 'databas':34,99 'definit':90 'deliber':46 'design':47 'differenti':24 'driver':54 'earli':81 'early-stag':80 'engin':29 'extens':9,49 'featur':59 'framework':73 'framework-agnost':72 'full':58 'full-featur':57 'hidden':41 'hook':65 'includ':25 'javascript':91 'key':23 'magic':44 'model':37 'modular':8 'mongo':97 'mongodb':19 'mssql':96 'mysql':21,93 'mythix':1,3 'node':86 'node.js':10 'nosql':33 'offer':56 'orm':2,4,11,63,92 'pariti':60 'plan':17 'plugin':51 'postgr':94 'postgresql':15,95 'queri':28 'relat':66 'releas':75 'ship':83 'slim':70 'snowflak':98 'sql':31 'sqlite':13 'stabl':84 'stage':82 'stay':69 'support':12 'system':38 'transact':67 'typescript':89,100 'unifi':27 'v1.15.0':5 'valid':64 'via':50","created_at":"2026-06-04T18:53:01.536820+00:00","updated_at":"2026-06-04T18:53:01.536820+00:00","problems":[{"fix":"Use import { Model } from 'mythix-orm' or const { Model } = require('mythix-orm').","cause":"Importing Model incorrectly (e.g., default import instead of named import).","error":"TypeError: Class extends value undefined is not a constructor or null"},{"fix":"Install the driver: npm install mythix-orm-sqlite","cause":"Missing SQLite driver package.","error":"Error: Cannot find module 'mythix-orm-sqlite'"},{"fix":"Set allowNull: false on required fields or provide a value.","cause":"Field not defined with allowNull: false but value is missing.","error":"SequelizeValidationError: notNull Violation: ... cannot be null"},{"fix":"Use Types.XID() (with parentheses) to create the type instance.","cause":"Calling Types.XID without parentheses (Types.XID instead of Types.XID()).","error":"TypeError: (intermediate value).XID is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/th317erd/mythix-orm#readme","github":"https://github.com/th317erd/mythix-orm","docs":null,"changelog":null,"pypi":null,"npm":"mythix-orm","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}