Skip to content

TML-2790: M:N SQLite demo examples + project plan expansion (slices 4–6)#697

Merged
tensordreams merged 0 commit into
tml-2787-slice-3-writefrom
tml-2790-mn-demo-examples
Jun 5, 2026
Merged

TML-2790: M:N SQLite demo examples + project plan expansion (slices 4–6)#697
tensordreams merged 0 commit into
tml-2787-slice-3-writefrom
tml-2790-mn-demo-examples

Conversation

@tensordreams
Copy link
Copy Markdown
Contributor

Follow-on to the SQL ORM: Many-to-Many End to End project: M:N demo examples + the project-plan expansion they surfaced.

Stacked PR — top of the M:N stack: tml-2787 (#683) → … → tml-2729 (#667) → main (the whole stack is rebased onto the latest main).

SQLite demo M:N examples (72ef8b793, 883309ecc)

The SQLite demo (examples/prisma-next-demo-sqlite, TS-authored) now demonstrates the full M:N ORM API via a pure Post ↔ Tag junction (PostTag):

  • Read: get-post-tags.include(tags, t => t.select(...)).
  • Filter: get-posts-by-tag-filter.where(p => p.tags.some/none/every(t => t.label.eq(...))).
  • Write (callback mutator): connect-post-tags / disconnect-post-tags / create-post-with-tags.update/.create({ tags: t => t.connect/disconnect/create([...]) }) with readback.

Wired as 6 CLI commands + seed; smoke-tested end-to-end (SQLite is offline-runnable); emitted contract carries cardinality:N:M + through; emit:check + typecheck clean.

Why only SQLite (and the plan expansion) (d711adfb6)

Adding examples surfaced a real gap: the navigable M:N API is authorable only via the TS contract builder (rel.manyToMany), not PSL — PSL emits only 1:N/N:1 and routes M:N to explicit junction models. The PG demo emits from PSL, so it cant show M:N until PSL learns to author it. So:

  • Filed TML-2794 — PSL many-to-many authoring (the framework gap).
  • Filed TML-2795 — PG demo M:N examples + pre-existing dual-mode contract drift (blocked by TML-2794).
  • Amended the project spec + plan with follow-on slices 4–6 (SQLite examples [done], PSL M:N authoring [planned], PG demo [planned]) + slice specs/plans. Slice 5 is framework-scoped and flagged for possible promotion to its own project.

Scope / notes

This PR ships the SQLite examples + the planning docs only. PG demo examples + PSL authoring are tracked (TML-2794/2795) and specd but not implemented here. No production src/ changes — demo + project-docs only.

Refs: TML-2790.

@tensordreams tensordreams requested a review from a team as a code owner June 2, 2026 13:47
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 2, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 24facad1-f63e-449d-bf16-760929c14251

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch tml-2790-mn-demo-examples

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 and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

size-limit report 📦

Path Size
postgres / no-emit 146.17 KB (0%)
postgres / emit 118.09 KB (0%)
mongo / no-emit 76.04 KB (0%)
mongo / emit 70.89 KB (0%)
cf-worker / no-emit 174.84 KB (0%)
cf-worker / emit 143.55 KB (0%)

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Jun 2, 2026

Open in StackBlitz

@prisma-next/extension-author-tools

npm i https://pkg.pr.new/@prisma-next/extension-author-tools@697

@prisma-next/mongo-runtime

npm i https://pkg.pr.new/@prisma-next/mongo-runtime@697

@prisma-next/family-mongo

npm i https://pkg.pr.new/@prisma-next/family-mongo@697

@prisma-next/sql-runtime

npm i https://pkg.pr.new/@prisma-next/sql-runtime@697

@prisma-next/family-sql

npm i https://pkg.pr.new/@prisma-next/family-sql@697

@prisma-next/extension-arktype-json

npm i https://pkg.pr.new/@prisma-next/extension-arktype-json@697

@prisma-next/middleware-cache

npm i https://pkg.pr.new/@prisma-next/middleware-cache@697

@prisma-next/mongo

npm i https://pkg.pr.new/@prisma-next/mongo@697

@prisma-next/extension-paradedb

npm i https://pkg.pr.new/@prisma-next/extension-paradedb@697

@prisma-next/extension-pgvector

npm i https://pkg.pr.new/@prisma-next/extension-pgvector@697

@prisma-next/extension-postgis

npm i https://pkg.pr.new/@prisma-next/extension-postgis@697

@prisma-next/postgres

npm i https://pkg.pr.new/@prisma-next/postgres@697

@prisma-next/sql-orm-client

npm i https://pkg.pr.new/@prisma-next/sql-orm-client@697

@prisma-next/sqlite

npm i https://pkg.pr.new/@prisma-next/sqlite@697

@prisma-next/target-mongo

npm i https://pkg.pr.new/@prisma-next/target-mongo@697

@prisma-next/adapter-mongo

npm i https://pkg.pr.new/@prisma-next/adapter-mongo@697

@prisma-next/driver-mongo

npm i https://pkg.pr.new/@prisma-next/driver-mongo@697

@prisma-next/contract

npm i https://pkg.pr.new/@prisma-next/contract@697

@prisma-next/utils

npm i https://pkg.pr.new/@prisma-next/utils@697

@prisma-next/config

npm i https://pkg.pr.new/@prisma-next/config@697

@prisma-next/errors

npm i https://pkg.pr.new/@prisma-next/errors@697

@prisma-next/framework-components

npm i https://pkg.pr.new/@prisma-next/framework-components@697

@prisma-next/operations

npm i https://pkg.pr.new/@prisma-next/operations@697

@prisma-next/ts-render

npm i https://pkg.pr.new/@prisma-next/ts-render@697

@prisma-next/contract-authoring

npm i https://pkg.pr.new/@prisma-next/contract-authoring@697

@prisma-next/ids

npm i https://pkg.pr.new/@prisma-next/ids@697

@prisma-next/psl-parser

npm i https://pkg.pr.new/@prisma-next/psl-parser@697

@prisma-next/psl-printer

npm i https://pkg.pr.new/@prisma-next/psl-printer@697

@prisma-next/cli

npm i https://pkg.pr.new/@prisma-next/cli@697

@prisma-next/cli-telemetry

npm i https://pkg.pr.new/@prisma-next/cli-telemetry@697

@prisma-next/emitter

npm i https://pkg.pr.new/@prisma-next/emitter@697

@prisma-next/migration-tools

npm i https://pkg.pr.new/@prisma-next/migration-tools@697

prisma-next

npm i https://pkg.pr.new/prisma-next@697

@prisma-next/vite-plugin-contract-emit

npm i https://pkg.pr.new/@prisma-next/vite-plugin-contract-emit@697

@prisma-next/mongo-codec

npm i https://pkg.pr.new/@prisma-next/mongo-codec@697

@prisma-next/mongo-contract

npm i https://pkg.pr.new/@prisma-next/mongo-contract@697

@prisma-next/mongo-value

npm i https://pkg.pr.new/@prisma-next/mongo-value@697

@prisma-next/mongo-contract-psl

npm i https://pkg.pr.new/@prisma-next/mongo-contract-psl@697

@prisma-next/mongo-contract-ts

npm i https://pkg.pr.new/@prisma-next/mongo-contract-ts@697

@prisma-next/mongo-emitter

npm i https://pkg.pr.new/@prisma-next/mongo-emitter@697

@prisma-next/mongo-schema-ir

npm i https://pkg.pr.new/@prisma-next/mongo-schema-ir@697

@prisma-next/mongo-query-ast

npm i https://pkg.pr.new/@prisma-next/mongo-query-ast@697

@prisma-next/mongo-orm

npm i https://pkg.pr.new/@prisma-next/mongo-orm@697

@prisma-next/mongo-query-builder

npm i https://pkg.pr.new/@prisma-next/mongo-query-builder@697

@prisma-next/mongo-lowering

npm i https://pkg.pr.new/@prisma-next/mongo-lowering@697

@prisma-next/mongo-wire

npm i https://pkg.pr.new/@prisma-next/mongo-wire@697

@prisma-next/sql-contract

npm i https://pkg.pr.new/@prisma-next/sql-contract@697

@prisma-next/sql-errors

npm i https://pkg.pr.new/@prisma-next/sql-errors@697

@prisma-next/sql-operations

npm i https://pkg.pr.new/@prisma-next/sql-operations@697

@prisma-next/sql-schema-ir

npm i https://pkg.pr.new/@prisma-next/sql-schema-ir@697

@prisma-next/sql-contract-psl

npm i https://pkg.pr.new/@prisma-next/sql-contract-psl@697

@prisma-next/sql-contract-ts

npm i https://pkg.pr.new/@prisma-next/sql-contract-ts@697

@prisma-next/sql-contract-emitter

npm i https://pkg.pr.new/@prisma-next/sql-contract-emitter@697

@prisma-next/sql-lane-query-builder

npm i https://pkg.pr.new/@prisma-next/sql-lane-query-builder@697

@prisma-next/sql-relational-core

npm i https://pkg.pr.new/@prisma-next/sql-relational-core@697

@prisma-next/sql-builder

npm i https://pkg.pr.new/@prisma-next/sql-builder@697

@prisma-next/target-postgres

npm i https://pkg.pr.new/@prisma-next/target-postgres@697

@prisma-next/target-sqlite

npm i https://pkg.pr.new/@prisma-next/target-sqlite@697

@prisma-next/adapter-postgres

npm i https://pkg.pr.new/@prisma-next/adapter-postgres@697

@prisma-next/adapter-sqlite

npm i https://pkg.pr.new/@prisma-next/adapter-sqlite@697

@prisma-next/driver-postgres

npm i https://pkg.pr.new/@prisma-next/driver-postgres@697

@prisma-next/driver-sqlite

npm i https://pkg.pr.new/@prisma-next/driver-sqlite@697

commit: f3ee50e

@tensordreams tensordreams force-pushed the tml-2790-mn-demo-examples branch from d711adf to 5ad3cff Compare June 3, 2026 08:51
@tensordreams tensordreams force-pushed the tml-2787-slice-3-write branch from 3e1c908 to 308b48d Compare June 3, 2026 08:51
@tensordreams tensordreams force-pushed the tml-2790-mn-demo-examples branch from bd25a3c to c1c88d2 Compare June 3, 2026 11:32
@tensordreams tensordreams force-pushed the tml-2787-slice-3-write branch from 308b48d to bb3e246 Compare June 3, 2026 11:32
@tensordreams tensordreams force-pushed the tml-2790-mn-demo-examples branch from c1c88d2 to bd2c725 Compare June 4, 2026 15:12
@tensordreams tensordreams force-pushed the tml-2787-slice-3-write branch from bb3e246 to 47cf59e Compare June 4, 2026 15:12
@tensordreams tensordreams force-pushed the tml-2790-mn-demo-examples branch from bd2c725 to d39742d Compare June 4, 2026 15:41
@tensordreams tensordreams force-pushed the tml-2787-slice-3-write branch from 47cf59e to b04a59c Compare June 4, 2026 15:41
@tensordreams tensordreams force-pushed the tml-2790-mn-demo-examples branch from d39742d to a0f11ba Compare June 5, 2026 12:44
@tensordreams tensordreams force-pushed the tml-2787-slice-3-write branch from b04a59c to 04522c0 Compare June 5, 2026 12:44
@tensordreams tensordreams force-pushed the tml-2790-mn-demo-examples branch from a0f11ba to f3ee50e Compare June 5, 2026 14:21
@tensordreams tensordreams force-pushed the tml-2787-slice-3-write branch from 04522c0 to 4d8dad2 Compare June 5, 2026 14:21
@tensordreams tensordreams force-pushed the tml-2790-mn-demo-examples branch from f3ee50e to 16dc690 Compare June 5, 2026 15:02
@tensordreams tensordreams merged commit 16dc690 into tml-2787-slice-3-write Jun 5, 2026
@tensordreams tensordreams force-pushed the tml-2787-slice-3-write branch from 4d8dad2 to 16dc690 Compare June 5, 2026 15:02
@tensordreams tensordreams deleted the tml-2790-mn-demo-examples branch June 5, 2026 15:02
@tensordreams
Copy link
Copy Markdown
Contributor Author

Heads-up: this PR shows merged but nothing was actually merged — a botched force-push during a stack rebase briefly made the head identical to the base, and GitHub auto-marked it merged and deleted the branch. The branch is restored with identical content; review continues in #742.

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.

1 participant