← All projects
Project record1 mention
Originally shared on Hacker News

Typegres

Typegres is a type-safe TypeScript data layer for PostgreSQL, positioned as a "translator, not an abstraction" rather than a traditional ORM. It exposes the full power of PostgreSQL — all statements and built-in functions — through a type-safe TypeScript API. Its latest feature is class-based models with methods that are composable SQL expressions, letting tables carry expressive business logic and fully composable relations usable anywhere in a query (SELECT, WHERE, ORDER BY, etc.).

Last shared
01 / The problem

What it addresses

ORMs have hidden the power of PostgreSQL behind generic, database-agnostic abstractions that made sense in 2010 but are now a bottleneck for modern TypeScript + PostgreSQL stacks.

02 / Source history

Shared over time

Each entry reflects what was shared on that date. Details may have changed since then.

  1. Typegres

    Typegres is a type-safe TypeScript data layer for PostgreSQL, positioned as a "translator, not an abstraction" rather than a traditional ORM. It exposes the full power of PostgreSQL — all statements and built-in functions — through a type-safe TypeScript API. Its latest feature is class-based models with methods that are composable SQL expressions, letting tables carry expressive business logic and fully composable relations usable anywhere in a query (SELECT, WHERE, ORDER BY, etc.).

    Problem: ORMs have hidden the power of PostgreSQL behind generic, database-agnostic abstractions that made sense in 2010 but are now a bottleneck for modern TypeScript + PostgreSQL stacks.

    Posted by @ryanrasti · Original source ↗

    Source text · @ryanrasti · · Source ↗

    I'm working on Typegres, a new data layer for the modern stack (TypeScript + PostgreSQL). My take is that for years, ORMs have hidden the power of PostgreSQL behind generic, database-agnostic abstractions. This made sense in 2010, but now it's a bottleneck. Typegres rejects this. It's a "translator, not an abstraction," designed to express the full power of PostgreSQL (all statements, built-in functions, etc.) in a type-safe TypeScript API.