alepha@docs:~/docs/packages/alepha/orm$
cat core.md | pretty
1 min read
Last commit:

#Alepha - Orm

#Installation

Part of the alepha package. Import from alepha/orm.

npm install alepha

#Overview

Type-safe data layer over Drizzle ORM.

Features:

  • $entity schema definitions with Zod + db column helpers
  • Repository CRUD, pagination, joins, and optimistic locking
  • Introspection-based dev schema sync, file-based production migrations
  • SQLite by default; Postgres via alepha/orm/postgres

#API Reference

#Primitives

  • $entity — Creates a database entity primitive that defines table structure using Zod schemas.
  • $relations — Declares how entities relate to one another.
  • $repositories — One relation-aware repository per entity, in a single binding.
  • $repository — Get the repository for the given entity.
  • $seed — Activate seed mode: a convenience wrapper around $mode that runs the handler
  • $sequence — Declare a portable, scoped numeric sequence.

#Providers