{"id":41278,"library":"hysteria-orm","title":"Hysteria ORM","description":"Hysteria ORM is a modern, high-performance ORM for Node.js supporting SQL (PostgreSQL, MySQL, SQLite via sqlite3) and experimental NoSQL (MongoDB, Redis) databases. Currently at version 11.0.6, it ships TypeScript types and requires esbuild 0.28+, ioredis 5.10+, mongodb 7.1+, mssql 12.2+, mysql2 3.20+, oracledb 6.10+, pg 8.20+, sqlite3 6.0+, typescript 6.0+, and zod 4.4+ as peer dependencies. Key differentiators: unified API across multiple database engines, partial type safety, and active development with frequent breaking changes. Not recommended for production use.","status":"active","version":"11.0.6","language":"javascript","source_language":"en","source_url":"https://github.com/Frasan00/hysteria-orm","tags":["javascript","orm","library","sql","SQL","NoSql","typescript"],"install":[{"cmd":"npm install hysteria-orm","lang":"bash","label":"npm"},{"cmd":"yarn add hysteria-orm","lang":"bash","label":"yarn"},{"cmd":"pnpm add hysteria-orm","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"PostgreSQL driver","package":"pg","optional":true},{"reason":"MySQL driver","package":"mysql2","optional":true},{"reason":"SQLite driver","package":"sqlite3","optional":true},{"reason":"MongoDB driver","package":"mongodb","optional":true},{"reason":"Redis driver","package":"ioredis","optional":true},{"reason":"MSSQL driver","package":"mssql","optional":true},{"reason":"Oracle DB driver","package":"oracledb","optional":true},{"reason":"Required for runtime compilation","package":"esbuild","optional":false},{"reason":"Required for schema type generation","package":"typescript","optional":false},{"reason":"Schema validation","package":"zod","optional":false}],"imports":[{"note":"ESM-only package; CJS require will fail.","wrong":"const HysteriaORM = require('hysteria-orm')","symbol":"HysteriaORM","correct":"import { HysteriaORM } from 'hysteria-orm'"},{"note":"Named export, not default.","wrong":"import Model from 'hysteria-orm'","symbol":"Model","correct":"import { Model } from 'hysteria-orm'"},{"note":"Subpath export; available since v11.","wrong":"import { buildSchema } from 'hysteria-orm'","symbol":"buildSchema","correct":"import { buildSchema } from 'hysteria-orm/schema'"}],"quickstart":{"code":"import { HysteriaORM, Model } from 'hysteria-orm';\nimport { z } from 'zod';\n\nconst orm = new HysteriaORM({\n  client: 'pg',\n  connection: {\n    host: 'localhost',\n    port: 5432,\n    user: 'postgres',\n    password: process.env.DB_PASSWORD ?? 'password',\n    database: 'test',\n  },\n});\n\nconst UserSchema = z.object({\n  id: z.number().int(),\n  name: z.string(),\n  email: z.string().email(),\n});\n\nconst User = new Model('users', UserSchema);\n\nasync function main() {\n  await orm.connect();\n  const users = await User.findMany();\n  console.log(users);\n  await orm.disconnect();\n}\n\nmain().catch(console.error);","lang":"typescript","description":"Connects to a PostgreSQL database, defines a User model with Zod schema, and performs a findMany query."},"warnings":[{"fix":"Pin to exact version and update imports as per changelog.","message":"Breaking changes occur between minor versions due to active development.","severity":"breaking","affected_versions":">=11.0.0"},{"fix":"Use SQL drivers for production.","message":"NoSQL support (MongoDB, Redis) is experimental and may be removed.","severity":"deprecated","affected_versions":">=11.0.0"},{"fix":"Install required drivers: npm install pg mysql2 sqlite3 etc.","message":"Multiple peer dependencies must be installed manually; orm will fail silently if drivers are missing.","severity":"gotcha","affected_versions":">=11.0.0"},{"fix":"Add 'type':'module' and use import syntax.","message":"ESM-only; requires Node.js >=22 and 'type':'module' in package.json.","severity":"gotcha","affected_versions":">=11.0.0"},{"fix":"Check documentation for current export paths.","message":"Subpath imports like 'hysteria-orm/schema' may change without notice.","severity":"gotcha","affected_versions":">=11.0.0"},{"fix":"Use z.object({...}).strict() on your schemas.","message":"Zod schemas must use .strict() or else extra fields are silently dropped.","severity":"gotcha","affected_versions":">=11.0.0"}],"env_vars":null,"search_vec":"'0.28':38 '11.0.6':30 '12.2':44 '3.20':46 '4.4':57 '5.10':40 '6.0':52,54 '6.10':48 '7.1':42 '8.20':50 'across':65 'activ':73 'api':64 'break':77 'chang':78 'current':27 'databas':26,67 'depend':60 'develop':74 'differenti':62 'engin':68 'esbuild':37 'experiment':22 'frequent':76 'high':9 'high-perform':8 'hysteria':1,3 'ioredi':39 'javascript':84 'key':61 'librari':86 'modern':7 'mongodb':24,41 'mssql':43 'multipl':66 'mysql':17 'mysql2':45 'node.js':13 'nosql':23,89 'oracledb':47 'orm':2,4,11,85 'partial':69 'peer':59 'perform':10 'pg':49 'postgresql':16 'product':82 'recommend':80 'redi':25 'requir':36 'safeti':71 'ship':32 'sql':15,87,88 'sqlite':18 'sqlite3':20,51 'support':14 'type':34,70 'typescript':33,53,90 'unifi':63 'use':83 'version':29 'via':19 'zod':56","created_at":"2026-06-04T18:51:38.160362+00:00","updated_at":"2026-06-04T18:51:38.160362+00:00","problems":[{"fix":"npm install pg","cause":"Missing peer dependency for PostgreSQL.","error":"Error: Cannot find module 'pg'"},{"fix":"Use import { HysteriaORM } from 'hysteria-orm'","cause":"Using CJS require instead of ESM import.","error":"TypeError: HysteriaORM is not a constructor"},{"fix":"Add .strict() to your Zod object schema.","cause":"Zod schema not strict; extra fields not allowed.","error":"Error: Schema validation failed: Unrecognized key(s) in object: 'extra'"}],"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/Frasan00/hysteria-orm","github":"https://github.com/Frasan00/hysteria-orm","docs":null,"changelog":null,"pypi":null,"npm":"hysteria-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}}