This package is still in development and not yet ready for production use.
A type-safe PostgreSQL query builder for TypeScript with a fluent API.
- 🎯 Full TypeScript support
- 🔒 Type-safe queries
- ⚡ Built on top of the high-performance
postgres.jspackage - 🔗 Fluent chainable API
- 🧩 Flexible SQL fragments:
whereRaw,orWhereRaw,orderByRaw - 🔍 Pattern matching operators in
where:LIKE,ILIKE,NOT LIKE,NOT ILIKE - 🔀 Join helpers:
joinandleftJoinwith Knex-style arguments - 🛡️ SQL injection prevention
- 📦 Transaction support
- 🎨 Clean and intuitive API
await client
.query('users')
.join('profiles', 'users.id', 'profiles.user_id')
.where('users.name', 'ILIKE', 'alice%')
.whereRaw('"profiles"."deleted_at" IS NULL')
.orWhereRaw('"users"."is_admin" = ?', true)
.orderByRaw('CASE WHEN "users"."status" = ? THEN 0 ELSE 1 END', 'active')npm install typed-pgTests run against a PGlite socket server started by Vitest global setup, so no external PostgreSQL service is required.