Skip to content

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

Open
artile wants to merge 1 commit into
MapleTechLabs:mainfrom
artile:docs/coming-from-drizzle-prisma
Open

artile wants to merge 1 commit 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 8 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: 8b7c5c45-f84d-4529-a61c-be4d8482a0c5
Commits

Reviewing files that changed from the base of the PR and between c5fa679 and 26fff93.

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

Comment @coderabbitai help to get the list of available commands.

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

1 participant