Back to articles
Hedystia 2.0: A New Type-Safe ORM for TypeScript with Multi-Database Support
How-ToSystems

Hedystia 2.0: A New Type-Safe ORM for TypeScript with Multi-Database Support

via Dev.toZastinian

Introducing @hedystia/db We just released Hedystia 2.0 , which introduces @hedystia/db — a brand-new database ORM that combines the best of Drizzle and TypeORM: Drizzle-like schema definition — Functional, composable, no decorators TypeORM-like query API — Intuitive db.users.find() syntax One schema, multiple databases — MySQL, SQLite, and File storage Quick Start bun add @hedystia/db Define Your Schema import { table , d } from " @hedystia/db " ; export const users = table ( " users " , { id : d . integer (). primaryKey (). autoIncrement (), name : d . varchar ( 255 ). notNull (), email : d . varchar ( 255 ). unique (), age : d . integer (). default ( 0 ), active : d . boolean (). default ( true ), bio : d . text (). nullable (), createdAt : d . datetime (), }); export const posts = table ( " posts " , { id : d . integer (). primaryKey (). autoIncrement (), userId : d . integer (). references (() => users . id , { onDelete : " CASCADE " , }), title : d . varchar ( 255 ). notNull (), c

Continue reading on Dev.to

Opens in a new tab

Read Full Article
2 views

Related Articles