{"id":41561,"library":"mythix-orm-sql-base","title":"Mythix ORM SQL Base","description":"SQL base support library for Mythix ORM (npm: mythix-orm), providing shared SQL dialect infrastructure for MySQL, PostgreSQL, MSSQL, and Snowflake drivers. Version 1.12.2 is the latest stable release, with updates following Mythix ORM's release cadence. It is not intended for standalone use; instead, it serves as a dependency for SQL-specific driver packages. Key differentiators include a unified SQL generation layer and type-safe query building. Ships TypeScript definitions and requires Node >=18. Peer dependency on mythix-orm ^1.14.0.","status":"active","version":"1.12.2","language":"javascript","source_language":"en","source_url":"https://github.com/th317erd/mythix-orm-sql-base","tags":["javascript","orm","mysql","postgres","postgresql","mssql","mongo","snowflake","database","typescript"],"install":[{"cmd":"npm install mythix-orm-sql-base","lang":"bash","label":"npm"},{"cmd":"yarn add mythix-orm-sql-base","lang":"bash","label":"yarn"},{"cmd":"pnpm add mythix-orm-sql-base","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency providing core ORM functionality","package":"mythix-orm","optional":false}],"imports":[{"note":"ESM-only module since v1. No CommonJS export.","wrong":"const SQLBase = require('mythix-orm-sql-base').SQLBase","symbol":"SQLBase","correct":"import { SQLBase } from 'mythix-orm-sql-base'"},{"note":"Do not deep import from dist; top-level barrell export works.","wrong":"import { SQLDialect } from 'mythix-orm-sql-base/dist/index.js'","symbol":"SQLDialect","correct":"import { SQLDialect } from 'mythix-orm-sql-base'"},{"note":"Default export is the module namespace, not a single class.","wrong":"import * as mythixOrmSqlBase from 'mythix-orm-sql-base'","symbol":"default","correct":"import mythixOrmSqlBase from 'mythix-orm-sql-base'"}],"quickstart":{"code":"import { SQLBase } from 'mythix-orm-sql-base';\nimport { Model } from 'mythix-orm';\n\nclass User extends SQLBase(Model) {\n  static fields = {\n    id: { type: 'integer', primaryKey: true, autoIncrement: true },\n    name: { type: 'string', required: true },\n    email: { type: 'string', unique: true },\n  };\n}\n\nconsole.log(User.getTableName()); // 'users'\nconsole.log(User.fields.email.type); // 'string'","lang":"typescript","description":"Shows how to define a model extending SQLBase from mythix-orm-sql-base, using Mythix ORM's Model mixin."},"warnings":[{"fix":"Use import syntax or dynamic import() in CommonJS projects.","message":"ESM-only from v1.0.0: require() will throw ERR_REQUIRE_ESM.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Run npm install mythix-orm alongside this package.","message":"Peer dependency mythix-orm must be manually installed; npm only warns.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use type: 'string' instead of type: 'text'.","message":"Field type 'text' is deprecated in favor of 'string'.","severity":"deprecated","affected_versions":">=1.10.0"},{"fix":"Import SQLBase before Model, or use SQLBase(Model) directly.","message":"SQLBase mixes in Model from mythix-orm; order of imports matters for type inference.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Upgrade Node.js to v18.0.0 or higher.","message":"Dropped support for Node <18 in v1.11.0.","severity":"breaking","affected_versions":">=1.11.0"}],"env_vars":null,"search_vec":"'1.12.2':29 '1.14.0':89 '18':82 'base':4,6 'build':75 'cadenc':42 'databas':98 'definit':78 'depend':55,84 'dialect':19 'differenti':63 'driver':27,60 'follow':37 'generat':68 'includ':64 'infrastructur':20 'instead':50 'intend':46 'javascript':90 'key':62 'latest':32 'layer':69 'librari':8 'mongo':96 'mssql':24,95 'mysql':22,92 'mythix':1,10,14,38,87 'mythix-orm':13,86 'node':81 'npm':12 'orm':2,11,15,39,88,91 'packag':61 'peer':83 'postgr':93 'postgresql':23,94 'provid':16 'queri':74 'releas':34,41 'requir':80 'safe':73 'serv':52 'share':17 'ship':76 'snowflak':26,97 'specif':59 'sql':3,5,18,58,67 'sql-specif':57 'stabl':33 'standalon':48 'support':7 'type':72 'type-saf':71 'typescript':77,99 'unifi':66 'updat':36 'use':49 'version':28","created_at":"2026-06-04T18:53:00.396777+00:00","updated_at":"2026-06-04T18:53:00.396777+00:00","problems":[{"fix":"Switch to import syntax or use dynamic import().","cause":"Using require() on an ESM-only package.","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module [...] not supported."},{"fix":"Run 'npm install mythix-orm'.","cause":"Missing peer dependency mythix-orm.","error":"Cannot find module 'mythix-orm'"},{"fix":"Usage: class User extends SQLBase(Model) { ... }","cause":"Using SQLBase directly without calling it as a mixin (e.g., SQLBase(Model)).","error":"TypeError: SQLBase is not a constructor"}],"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-sql-base#readme","github":"https://github.com/th317erd/mythix-orm-sql-base","docs":null,"changelog":null,"pypi":null,"npm":"mythix-orm-sql-base","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}}