{"id":43507,"library":"omni-orm","title":"Omni ORM","description":"Omni ORM is a next-generation TypeScript ORM spanning MySQL, MSSQL, and PostgreSQL with a minimal footprint (~500b). Version 2.0.2 is the current stable release, relying on decorators and emitDecoratorMetadata for operation. It is designed exclusively for TypeScript and requires the reflect-metadata polyfill and injector-next as a peer dependency. Differentiators: ultra-small bundle, multi-dialect support, and a promise-heavy API. Release cadence is irregular; breaking changes are expected as the API is not yet final.","status":"active","version":"2.0.2","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","orm","mysql","mssql","postgresql","typescript"],"install":[{"cmd":"npm install omni-orm","lang":"bash","label":"npm"},{"cmd":"yarn add omni-orm","lang":"bash","label":"yarn"},{"cmd":"pnpm add omni-orm","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency required for dependency injection decorators","package":"injector-next","optional":false},{"reason":"Required for decorator metadata emission in TypeScript","package":"reflect-metadata","optional":false}],"imports":[{"note":"Named export only; default import will cause runtime error in ESM.","wrong":"import OmniORM from 'omni-orm'","symbol":"OmniORM","correct":"import { OmniORM } from 'omni-orm'"},{"note":"CommonJS: destructure the named export; direct require returns an object.","wrong":"const OmniORM = require('omni-orm')","symbol":"OmniORM","correct":"const { OmniORM } = require('omni-orm')"},{"note":"No default export in CJS; use destructuring.","wrong":"const OmniORM = require('omni-orm').default","symbol":"OmniORM","correct":"import { OmniORM } from 'omni-orm'"}],"quickstart":{"code":"import 'reflect-metadata';\nimport { OmniORM } from 'omni-orm';\n\nconst orm = new OmniORM({\n  dialect: 'postgresql',\n  host: 'localhost',\n  port: 5432,\n  username: process.env.DB_USER ?? 'postgres',\n  password: process.env.DB_PASSWORD ?? '',\n  database: 'mydb'\n});\n\n// Define entity with decorators\n@orm.Entity()\nclass User {\n  @orm.PrimaryKey()\n  id!: number;\n\n  @orm.Column()\n  name!: string;\n}\n\nasync function main() {\n  await orm.connect();\n  const user = await orm.findOne(User, { where: { id: 1 } });\n  console.log(user);\n  await orm.close();\n}\n\nmain().catch(console.error);","lang":"typescript","description":"Demonstrates setup, entity definition with decorators, and a simple findOne query against a PostgreSQL database."},"warnings":[{"fix":"Pin to exact version and test upgrades thoroughly","message":"API is not yet final; breaking changes may occur in minor/patch releases","severity":"deprecated","affected_versions":">=2.0.0 <2.0.2"},{"fix":"Add import 'reflect-metadata' at the top of your main file or tsconfig 'types' field","message":"Requires reflect-metadata polyfill to be imported at the entry point","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Enable both flags in tsconfig.json compilerOptions","message":"Missing 'experimentalDecorators' and 'emitDecoratorMetadata' in tsconfig will cause runtime reflection errors","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Use only in Node.js environment","message":"No browser support; attempting to use in browser will fail due to missing Node APIs","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Maintain injector-next version as specified in peerDependencies","message":"injector-next peer dependency may have breaking changes","severity":"deprecated","affected_versions":">=2.0.0"}],"env_vars":null,"search_vec":"'2.0.2':23 '500b':21 'api':71,82 'break':76 'bundl':61 'cadenc':73 'chang':77 'current':26 'decor':31 'depend':56 'design':38 'dialect':64 'differenti':57 'emitdecoratormetadata':33 'exclus':39 'expect':79 'final':86 'footprint':20 'generat':9 'heavi':70 'injector':51 'injector-next':50 'irregular':75 'javascript':87 'metadata':47 'minim':19 'mssql':14,90 'multi':63 'multi-dialect':62 'mysql':13,89 'next':8,52 'next-gener':7 'omni':1,3 'oper':35 'orm':2,4,11,88 'peer':55 'polyfil':48 'postgresql':16,91 'promis':69 'promise-heavi':68 'reflect':46 'reflect-metadata':45 'releas':28,72 'reli':29 'requir':43 'small':60 'span':12 'stabl':27 'support':65 'typescript':10,41,92 'ultra':59 'ultra-smal':58 'version':22 'yet':85","created_at":"2026-06-05T17:00:08.393857+00:00","updated_at":"2026-06-05T17:00:08.393857+00:00","problems":[{"fix":"Set 'experimentalDecorators': true and 'emitDecoratorMetadata': true in tsconfig.json","cause":"Missing or incorrect tsconfig compiler options","error":"Error: Cannot reflect metadata for property 'id' of class User. Ensure 'emitDecoratorMetadata' and 'experimentalDecorators' are enabled."},{"fix":"Add import 'reflect-metadata' at the top of your entry file","cause":"reflect-metadata polyfill not imported","error":"TypeError: Reflect is not defined"},{"fix":"Run 'npm install injector-next@^1.1.1'","cause":"Missing peer dependency injector-next","error":"Error: Cannot find module 'injector-next'"},{"fix":"Use import { OmniORM } from 'omni-orm'","cause":"Using import OmniORM from 'omni-orm' instead of named import","error":"TypeError: omni_orm_1.default 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://gitlab.com/tde-npm-packages/omni-orm#readme","github":null,"docs":null,"changelog":null,"pypi":null,"npm":"omni-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-05","next_check":"2026-09-03","install_tag":null}}