Add COMPARISON.md vs Prisma, Kysely, pgTyped, Zapatos#6
Conversation
Scoped deliberately to build step, runtime parser cost, bundle size, and DX - explicitly not a runtime query-speed benchmark, since that's dominated by the database/driver and compares architecturally different tools unfairly. Every factual claim is researched and cited (bundlephobia's API for bundle sizes, official docs/blog posts/GitHub issues for build-step and runtime architecture), not assumed: - Kysely: 189 KB / 38.7 KB gzip, no required build step, but every query call compiles the builder chain to SQL at runtime. - pgTyped: mandatory CLI codegen against a live Postgres just to type-check, but the runtime is close to a passthrough since the SQL text is already known by generate time. @pgtyped/runtime measures larger than expected (399 KB / 85 KB gzip) - called out rather than glossed over. - Prisma: mandatory `prisma generate`. The historical Rust query engine was ~14 MB / ~7 MB gzip (a well-documented Lambda cold-start problem); the TypeScript-based rewrite (GA since v6.16, default in v7) cut that to ~1.6 MB / ~600 KB gzip. @prisma/client itself measures near-zero on bundlephobia only because the real client is generated at build time - noted as misleading rather than used at face value. - Zapatos: schema generation is one-shot/opt-in like this library's own `generate`, not a per-build requirement; not resolvable on bundlephobia (CLI+library hybrid) - stated as a gap, not papered over with a guess. sql-template-typed's own numbers are grounded in checkable facts rather than marketing language: zero entries in package.json's dependencies field, and the entire runtime surface (src/index.ts + src/result.ts) is 128 lines, most of it type declarations erased at compile time. Linked from the README's "Why I built it" section.
|
Warning Review limit reached
Next review available in: 52 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Adds
COMPARISON.md, scoped deliberately to build step, runtime parser cost, bundle size, and DX — explicitly not a runtime query-speed benchmark, since that's dominated by the database/driver and compares architecturally different tools (full ORM vs query builder vs SQL-in-files vs type-level parser) unfairly.Every factual claim is researched and cited (bundlephobia's API for bundle sizes, official docs/blog posts/GitHub issues for build-step and runtime architecture), not assumed:
@pgtyped/runtimemeasures larger than expected (399 KB / 85 KB gzip) — called out rather than glossed over.prisma generate. The historical Rust query engine was ~14 MB / ~7 MB gzip (a well-documented Lambda cold-start problem); the TypeScript-based rewrite (GA since v6.16, default in v7) cut that to ~1.6 MB / ~600 KB gzip.@prisma/clientitself measures near-zero on bundlephobia only because the real client is generated at build time — noted as misleading rather than used at face value.generate, not a per-build requirement; not resolvable on bundlephobia (CLI+library hybrid) — stated as a gap, not papered over with a guess.sql-template-typed's own numbers are grounded in checkable facts rather than marketing language: zero entries inpackage.json'sdependenciesfield, and the entire runtime surface (src/index.ts+src/result.ts) is 128 lines, most of it type declarations erased at compile time.Linked from the README's "Why I built it" section.
Test plan
npm testre-run to confirm nothing else was touched (47 tests passing, unchanged)