Skip to content

docs: coming from Drizzle or Prisma, and a Worker on Hyperdrive - #117

Merged
Makisuo merged 3 commits into
MapleTechLabs:mainfrom
artile:docs/coming-from-drizzle-prisma
Nov 2, 2026
Merged

Makisuo merged 3 commits into
MapleTechLabs:mainfrom
artile:docs/coming-from-drizzle-prisma

Conversation

@artile

@artile artile commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

A team that moves from Prisma or Drizzle has no map to effect-orm. It cannot see quickly which operations exist today and which are still open.

Closes #91.
Part of #52.

Changes

  • New guide docs/coming-from-drizzle-prisma.md. A table maps the common Prisma and Drizzle operations to effect-orm: findUnique / findFirst / findMany, include, _count, some / none / every, create / createMany / upsert, update / updateMany, delete, transactions, raw SQL, FOR UPDATE, unique violations, cursor pagination, case-insensitive search, JSON fields, defaults, @updatedAt, @map, seeding, migrations, pull and drift.
  • Where main has the operation, the table names it. Where only an open PR has it, the cell says "planned: #N" and gives today's workaround. The guide has no example for a planned API.
  • One checked program, coming-from-prisma.ts, runs most of the table on PGlite with requireTenantScope on. check-doc-examples.mjs now asserts its full result.
  • A section "What is different by design": Effect services and Layers, typed errors, Schema-decoded rows, the tenant scope proof.
  • A CAFE Worker sketch: cafe-worker.ts is a fetch handler that builds a Database for each request. cafe-worker-local.ts runs it on PGlite with no network, and the doc check asserts its responses (rows for one org, 401 with no org). The Hyperdrive wiring with @effect/sql-pg is shown as an unchecked block.
  • Links from docs/README.md and README.md. One patch changeset.

Left out

Validation

  • bun run build: ok.
  • bun run typecheck: ok.
  • bunx vitest run --testTimeout=60000 --hookTimeout=60000 against ClickHouse 26.8.2.7: 60 files, 1034 tests passed, 0 skipped.
  • node scripts/check-doc-citations.mjs: ok (26 files).
  • node scripts/check-exports-documented.mjs: ok (287 /clickhouse, 205 /postgres exports).
  • node scripts/check-doc-examples.mjs: ok (24 files typechecked, behavior checks passed, including the two new examples).
  • bun scripts/check-package.ts: ok.
  • Upstream CI for fork PRs waits for a maintainer to approve the run.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 39 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b034bf68-e96c-452c-ab5d-3139734e9fc4
Commits

Reviewing files that changed from the base of the PR and between b57faf1 and 1a7395a.

Files selected for processing: 5
  • .changeset/coming-from-drizzle-prisma.md
  • README.md
  • docs/README.md
  • docs/coming-from-drizzle-prisma.md
  • scripts/check-doc-examples.mjs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

Makisuo and others added 2 commits November 2, 2026 16:41
The guide said Postgres is the only dialect with transactions and RETURNING,
and that D1 waits for MapleTechLabs#49. Name /sqlite in the intro, note where a row differs
on SQLite/D1 (no interactive transactions or batch wrapper on D1, no row locks,
no ILIKE and case-insensitive LIKE, no foreign keys in SQLite.table, generate-only
migrations, no SQLite pull), list the SQLite and D1 SqlClients, and point the
CAFE section at the D1 setup instead of a pending PR. The Drizzle mock cell no
longer claims Drizzle has none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Makisuo

Makisuo commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Maintainer pass for merge-readiness (head 1a7395a):

Changes

Verification

  • bun run build and bun run typecheck pass.
  • bun run test against live ClickHouse 26.8: 73 files and 1430 tests pass. check-doc-examples.mjs typechecked 29 files, and its behavior assertions for coming-from-prisma.ts and cafe-worker-local.ts pass. Doc citations and the export catalog pass.
  • FUZZ_SCALE=0.3 bunx vitest run tests/fuzz: 9 files and 269 tests pass.

@Makisuo
Makisuo merged commit af314c1 into MapleTechLabs:main Nov 2, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: "Coming from Drizzle / Prisma" and a CAFE example

2 participants