PRO

Drizzle Postgres JIT Query Layer

A Postgres schema and typed query layer on the Drizzle 1.0 release candidate. It uses the rc.1 casing API (snakeCase.table replaces the removed drizzle({ casing }) option), a defineRelations graph with a filtered relation and a non-optional one-to-one, opt-in JIT row mappers, module-scope prepared statements bound with sql.placeholder, rc.4 nullability-preserving sql aggregates via .mapWith() and .nullable(), and an insert().select() backfill that skips defaulted columns.

Install
npx shadcn@latest add @compronents/drizzle-pg-jit-query-layer

Installs from ui.aryank.space. Needs a registry token and a one-time @compronents entry in components.json. The docs walk through both.

Visualization
prepared
PgRelationalQuery<Package>
query
unknown
const q = db.query.packages.findFirst({ where: { slug: sql.placeholder("slug") } }).prepare("package_detail")

Prepared statements bound at module scope with sql.placeholder skip re-planning; opt-in JIT mappers shape rows on the way out.

Files
Checking access…
Dependencies