TML-3168: Return affected write counts without pre-SELECT - #29921
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe runtime API now separates row-producing ChangesRuntime query and execute split
Estimated code review effort: 5 (Critical) | ~120 minutes Sequence Diagram(s)sequenceDiagram
participant Caller
participant Runtime
participant Middleware
participant Driver
Caller->>Runtime: query(plan)
Runtime->>Middleware: Run query lifecycle
Middleware->>Driver: Stream rows
Driver-->>Caller: AsyncIterableResult<Row>
Caller->>Runtime: execute(plan)
Runtime->>Middleware: Run execute lifecycle
Middleware->>Driver: Execute statement
Driver-->>Caller: RuntimeStatementStats
Possibly related issues
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
⚔️ Resolve merge conflicts 💡
🧪 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 |
prisma-next
@prisma/orm-extension-arktype-json
@prisma/orm-extension-middleware-cache
@prisma/orm-extension-paradedb
@prisma/orm-extension-pgvector
@prisma/orm-extension-postgis
@prisma/orm-extension-supabase
@prisma/orm-family-mongo
@prisma/orm-family-sql
@prisma/orm-framework
@prisma/orm-mongo
@prisma/orm-postgres
@prisma/orm-sqlite
@prisma/orm-target-mongo
@prisma/orm-target-postgres
@prisma/orm-target-sqlite
@prisma/orm-toolchain
commit: |
size-limit report 📦
|
There was a problem hiding this comment.
Actionable comments posted: 7
🧹 Nitpick comments (2)
packages/2-mongo-family/1-foundation/mongo-codec/src/codecs.ts (1)
57-57: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueName both operations in the comment.
The runtime now allocates a
CodecCallContextforexecute()calls as well asquery()calls. The SQL counterpart inpackages/2-sql/5-runtime/src/codecs/encoding.tsLine 74 says "the surroundingqueryorexecutecall". Use the same wording here.📝 Proposed wording change
- // The runtime allocates one `CodecCallContext` per `runtime.query()` call (no caller-supplied `signal` produces `{}` instead of `undefined`) and threads it as a non-optional reference to every codec call. The author surface keeps the second parameter optional so single-arg `(value) => …` authors continue to satisfy the signature via TypeScript's bivariance for trailing parameters. + // The runtime allocates one `CodecCallContext` per `runtime.query()` or `runtime.execute()` call (no caller-supplied `signal` produces `{}` instead of `undefined`) and threads it as a non-optional reference to every codec call. The author surface keeps the second parameter optional so single-arg `(value) => …` authors continue to satisfy the signature via TypeScript's bivariance for trailing parameters.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/2-mongo-family/1-foundation/mongo-codec/src/codecs.ts` at line 57, Update the comment near the codec call context definition to name both runtime operations, stating that one CodecCallContext is allocated per surrounding query or execute call. Keep the existing explanation about omitted signals, non-optional codec references, and the optional author-facing parameter unchanged.packages/1-framework/1-core/framework-components/src/execution/run-with-middleware.ts (1)
41-41: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueReplace the bare
ascast withblindCast.Line 41 uses a bare double cast in production code. The coding guidelines forbid bare
ascasts outside tests andas const. If this cast already existed before the change, keep it and treat the cleanup as separate work.♻️ Proposed change
- rowSource = result.rows as unknown as AsyncIterable<Row> | Iterable<Row>; + rowSource = blindCast< + AsyncIterable<Row> | Iterable<Row>, + 'Intercepted rows are typed as Record<string, unknown>; the caller owns row typing' + >(result.rows);As per coding guidelines: "Do not use bare
ascasts in production code. UseblindCast<T, \"Reason\">orcastAs<T>from@internal/utils/casts".🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/1-framework/1-core/framework-components/src/execution/run-with-middleware.ts` at line 41, Replace the double cast assigned to rowSource in the run-with-middleware execution flow with blindCast, supplying the target AsyncIterable<Row> | Iterable<Row> type and a concise reason; preserve the existing assignment behavior without changing surrounding logic.Sources: Coding guidelines, Learnings
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/1-framework/1-core/framework-components/src/shared/codec-types.ts`:
- Line 34: Update the CodecCallContext documentation in
packages/1-framework/1-core/framework-components/src/shared/codec-types.ts:34-34
and both encode/decode documentation blocks in
packages/1-framework/1-core/framework-components/src/shared/codec.ts:44-46 to
describe context allocation once per runtime operation, covering query(),
queryPrepared(), and execute(), rather than query() only.
In
`@packages/1-framework/1-core/framework-components/test/runtime-core-options.types.test-d.ts`:
- Around line 61-68: Extend the “RuntimeExecutor operations accept options arg”
type test to assert ExecuteParams[1] with the same readonly signal/scope options
union currently used for QueryParams[1]. Keep the existing query assertion
unchanged and add the corresponding execute assertion so both RuntimeExecutor
methods are covered.
In `@packages/2-sql/4-lanes/relational-core/README.md`:
- Line 133: Update the README documentation around codec context to state that
the runtime allocates one SqlCodecCallContext for both runtime.query(plan, {
signal }) and RuntimeCore.execute() calls. Clarify that the same non-optional
context reference is threaded through every codec dispatch, using an empty {}
when no signal is provided, while retaining the existing guidance that codecs
may ignore the context.
In `@packages/2-sql/4-lanes/relational-core/src/runtime-scope.ts`:
- Around line 23-26: Update RuntimeScope.execute to accept only
SqlExecutionPlan, while leaving RuntimeScope.query capable of accepting
SqlOrmPlan<Row>. Adjust the relevant type import or reference and preserve the
existing SqlStatementStats return type so row-producing SqlQueryPlan values are
rejected at compile time.
In `@packages/3-extensions/sql-orm-client/src/collection.ts`:
- Line 1692: Route count-only DML plans through execute() instead of
queryPlanRows() or scope.query(): at
packages/3-extensions/sql-orm-client/src/collection.ts:1692 use
this.ctx.runtime.execute(plan), at :1701 use this.ctx.runtime.execute(compiled),
and at :2218 use scope.execute(deletePlan). Apply these changes in the
createAndCount and deleteAll flows while preserving their existing count
handling.
In `@packages/3-extensions/sql-orm-client/src/mutation-executor.ts`:
- Line 1046: Route non-returning DML through execution APIs rather than row
queries: in packages/3-extensions/sql-orm-client/src/mutation-executor.ts at
lines 1046, 1092, and 1263, change the compileInsertCount, compileDeleteCount,
and compileUpdateCount paths to use await scope.execute(compiled); in
test/integration/test/scalar-lists/psl-list-roundtrip.integration.test.ts at
lines 231 and 316, change the non-returning insert calls to
runtime.execute(...). Preserve query-based handling for row-returning and SELECT
plans.
In
`@skills/prisma-next-upgrade/upgrades/8.0.0-rc.1-to-8.0.0-rc.2/instructions.md`:
- Around line 27-33: Update the migration table headers to replace “Before 0.18”
and “0.18 translation” with the actual `8.0.0-rc.1` and `8.0.0-rc.2` version
labels, keeping the existing translation rows unchanged.
---
Nitpick comments:
In
`@packages/1-framework/1-core/framework-components/src/execution/run-with-middleware.ts`:
- Line 41: Replace the double cast assigned to rowSource in the
run-with-middleware execution flow with blindCast, supplying the target
AsyncIterable<Row> | Iterable<Row> type and a concise reason; preserve the
existing assignment behavior without changing surrounding logic.
In `@packages/2-mongo-family/1-foundation/mongo-codec/src/codecs.ts`:
- Line 57: Update the comment near the codec call context definition to name
both runtime operations, stating that one CodecCallContext is allocated per
surrounding query or execute call. Keep the existing explanation about omitted
signals, non-optional codec references, and the optional author-facing parameter
unchanged.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro Plus
Run ID: 097890dc-5ee0-411a-afd1-2595be58a673
⛔ Files ignored due to path filters (22)
projects/affected-row-counts/plan.mdis excluded by!projects/**projects/affected-row-counts/slices/count-terminals/dispatches/01-framework-runtime-middleware-round2.mdis excluded by!projects/**projects/affected-row-counts/slices/count-terminals/dispatches/01-framework-runtime-middleware.mdis excluded by!projects/**projects/affected-row-counts/slices/count-terminals/dispatches/02-sql-runtime-query-execute-round2.mdis excluded by!projects/**projects/affected-row-counts/slices/count-terminals/dispatches/02-sql-runtime-query-execute-round3.mdis excluded by!projects/**projects/affected-row-counts/slices/count-terminals/dispatches/02-sql-runtime-query-execute.mdis excluded by!projects/**projects/affected-row-counts/slices/count-terminals/dispatches/03-mongo-runtime-statistics-round2.mdis excluded by!projects/**projects/affected-row-counts/slices/count-terminals/dispatches/03-mongo-runtime-statistics.mdis excluded by!projects/**projects/affected-row-counts/slices/count-terminals/dispatches/04-supabase-role-scopes.mdis excluded by!projects/**projects/affected-row-counts/slices/count-terminals/dispatches/05-sql-count-terminals.mdis excluded by!projects/**projects/affected-row-counts/slices/count-terminals/dispatches/06-close-hard-cut-round2.mdis excluded by!projects/**projects/affected-row-counts/slices/count-terminals/dispatches/06-close-hard-cut-round3.mdis excluded by!projects/**projects/affected-row-counts/slices/count-terminals/dispatches/06-close-hard-cut-round4.mdis excluded by!projects/**projects/affected-row-counts/slices/count-terminals/dispatches/06-close-hard-cut.mdis excluded by!projects/**projects/affected-row-counts/slices/count-terminals/dispatches/07-record-upgrade-instructions-round2.mdis excluded by!projects/**projects/affected-row-counts/slices/count-terminals/dispatches/07-record-upgrade-instructions-round3.mdis excluded by!projects/**projects/affected-row-counts/slices/count-terminals/dispatches/07-record-upgrade-instructions.mdis excluded by!projects/**projects/affected-row-counts/slices/count-terminals/plan.mdis excluded by!projects/**projects/affected-row-counts/slices/count-terminals/spec.mdis excluded by!projects/**projects/affected-row-counts/slices/query-execute-split/plan.mdis excluded by!projects/**projects/affected-row-counts/slices/query-execute-split/spec.mdis excluded by!projects/**projects/affected-row-counts/spec.mdis excluded by!projects/**
📒 Files selected for processing (209)
apps/telemetry-backend/src/handler.tsexamples/bundle-size/src/mongo/main-emit.tsexamples/bundle-size/src/mongo/main.tsexamples/bundle-size/src/postgres-worker/worker-emit.tsexamples/bundle-size/src/postgres-worker/worker.tsexamples/bundle-size/src/postgres/main-emit.tsexamples/bundle-size/src/postgres/main.tsexamples/mongo-blog-leaderboard/README.mdexamples/mongo-blog-leaderboard/src/queries.tsexamples/mongo-demo/scripts/cache-demo.tsexamples/mongo-demo/src/server.tsexamples/mongo-demo/test/cache-middleware.test.tsexamples/mongo-demo/test/query-builder-writes.test.tsexamples/paradedb-demo/src/queries/bm25-cast-demo.tsexamples/paradedb-demo/src/queries/bm25-chain-demo.tsexamples/paradedb-demo/src/queries/bm25-fuzzy.tsexamples/paradedb-demo/src/queries/bm25-match.tsexamples/paradedb-demo/src/queries/bm25-mode-tour.tsexamples/paradedb-demo/src/queries/bm25-proximity-chain.tsexamples/paradedb-demo/src/queries/bm25-proximity.tsexamples/paradedb-demo/src/queries/bm25-top-by-score.tsexamples/prisma-8-cloudflare-worker/README.mdexamples/prisma-8-cloudflare-worker/scripts/seed.tsexamples/prisma-8-cloudflare-worker/src/worker.tsexamples/prisma-8-demo-sqlite/scripts/seed.tsexamples/prisma-8-demo-sqlite/src/main.tsexamples/prisma-8-demo-sqlite/src/queries/dml-operations.tsexamples/prisma-8-demo-sqlite/src/queries/get-user-by-email-prepared.tsexamples/prisma-8-demo-sqlite/src/queries/get-users.tsexamples/prisma-8-demo-sqlite/src/transactions/add-posts-within-quota.tsexamples/prisma-8-demo/scripts/seed.tsexamples/prisma-8-demo/src/prisma-no-emit/priority-feed.tsexamples/prisma-8-demo/src/prisma/slow-query-warning.tsexamples/prisma-8-demo/src/queries/cross-author-similarity.tsexamples/prisma-8-demo/src/queries/dml-operations.tsexamples/prisma-8-demo/src/queries/enum-default-demo-no-emit.tsexamples/prisma-8-demo/src/queries/enum-default-demo.tsexamples/prisma-8-demo/src/queries/get-all-posts-unbounded.tsexamples/prisma-8-demo/src/queries/get-posts-by-priority.tsexamples/prisma-8-demo/src/queries/get-user-by-email-prepared.tsexamples/prisma-8-demo/src/queries/get-user-by-id-no-emit.tsexamples/prisma-8-demo/src/queries/get-user-by-id.tsexamples/prisma-8-demo/src/queries/get-user-posts-no-emit.tsexamples/prisma-8-demo/src/queries/get-user-posts.tsexamples/prisma-8-demo/src/queries/get-users-cached.tsexamples/prisma-8-demo/src/queries/get-users-no-emit.tsexamples/prisma-8-demo/src/queries/get-users.tsexamples/prisma-8-demo/src/queries/raw-sql-demo.tsexamples/prisma-8-demo/src/queries/similarity-search.tsexamples/prisma-8-demo/test/enum-surface.integration.test.tsexamples/prisma-8-demo/test/repositories.integration.test.tsexamples/prisma-8-demo/test/slow-query-warning.test.tsexamples/prisma-8-postgis-demo/src/queries/find-cafes-near-point.tsexamples/prisma-8-postgis-demo/test/queries.e2e.test.tsexamples/react-router-demo/app/routes/users.tsxexamples/retail-store/src/data/events.tsexamples/retail-store/src/data/products.tsexamples/supabase/src/profile-queries.tsexamples/supabase/src/session-queries.tspackages/1-framework/1-core/framework-components/src/execution/run-with-middleware.tspackages/1-framework/1-core/framework-components/src/execution/runtime-core.tspackages/1-framework/1-core/framework-components/src/execution/runtime-middleware.tspackages/1-framework/1-core/framework-components/src/exports/runtime.tspackages/1-framework/1-core/framework-components/src/shared/codec-types.tspackages/1-framework/1-core/framework-components/src/shared/codec.tspackages/1-framework/1-core/framework-components/test/before-execute-chain.test.tspackages/1-framework/1-core/framework-components/test/mock-family.test.tspackages/1-framework/1-core/framework-components/test/run-execute-with-middleware.test.tspackages/1-framework/1-core/framework-components/test/run-with-middleware.intercept.test.tspackages/1-framework/1-core/framework-components/test/run-with-middleware.test.tspackages/1-framework/1-core/framework-components/test/runtime-core-options.test.tspackages/1-framework/1-core/framework-components/test/runtime-core-options.types.test-d.tspackages/1-framework/1-core/framework-components/test/runtime-core.test.tspackages/1-framework/1-core/framework-components/test/runtime-core.types.test-d.tspackages/1-framework/1-core/framework-components/test/runtime-middleware.types.test-d.tspackages/2-mongo-family/1-foundation/mongo-codec/src/codecs.tspackages/2-mongo-family/5-query-builders/orm/src/collection.tspackages/2-mongo-family/5-query-builders/orm/src/executor.tspackages/2-mongo-family/5-query-builders/orm/test/collection.test.tspackages/2-mongo-family/7-runtime/src/mongo-runtime.tspackages/2-mongo-family/7-runtime/test/aggregate.test.tspackages/2-mongo-family/7-runtime/test/content-hash-guard.test.tspackages/2-mongo-family/7-runtime/test/decode-via-query-builder.test.tspackages/2-mongo-family/7-runtime/test/decode.integration.test.tspackages/2-mongo-family/7-runtime/test/delete-many.test.tspackages/2-mongo-family/7-runtime/test/delete.test.tspackages/2-mongo-family/7-runtime/test/execute-param-mutator-wiring.test.tspackages/2-mongo-family/7-runtime/test/find-one-and-delete.test.tspackages/2-mongo-family/7-runtime/test/find-one-and-update.test.tspackages/2-mongo-family/7-runtime/test/insert-many.test.tspackages/2-mongo-family/7-runtime/test/insert.test.tspackages/2-mongo-family/7-runtime/test/mongo-middleware.test.tspackages/2-mongo-family/7-runtime/test/mongo-runtime-abort.test.tspackages/2-mongo-family/7-runtime/test/mongo-runtime.types.test-d.tspackages/2-mongo-family/7-runtime/test/raw-commands.test.tspackages/2-mongo-family/7-runtime/test/read-plan.test.tspackages/2-mongo-family/7-runtime/test/runtime-types.test-d.tspackages/2-mongo-family/7-runtime/test/update-many.test.tspackages/2-mongo-family/7-runtime/test/update.test.tspackages/2-sql/4-lanes/relational-core/README.mdpackages/2-sql/4-lanes/relational-core/src/ast/types.tspackages/2-sql/4-lanes/relational-core/src/runtime-scope.tspackages/2-sql/4-lanes/relational-core/test/ast/driver-types.types.test-d.tspackages/2-sql/4-lanes/relational-core/test/runtime-scope.types.test-d.tspackages/2-sql/5-runtime/src/codecs/encoding.tspackages/2-sql/5-runtime/src/prepared/prepared-statement.tspackages/2-sql/5-runtime/src/prepared/types.tspackages/2-sql/5-runtime/src/sql-runtime.tspackages/2-sql/5-runtime/test/async-iterable-result.test.tspackages/2-sql/5-runtime/test/before-compile-chain.test.tspackages/2-sql/5-runtime/test/budgets.test.tspackages/2-sql/5-runtime/test/intercept-decoding.test.tspackages/2-sql/5-runtime/test/lints.test.tspackages/2-sql/5-runtime/test/marker-verification.test.tspackages/2-sql/5-runtime/test/marker-vs-intercept-ordering.test.tspackages/2-sql/5-runtime/test/plan-execution-id.test.tspackages/2-sql/5-runtime/test/prepared.test.tspackages/2-sql/5-runtime/test/prepared.types.test-d.tspackages/2-sql/5-runtime/test/raw-connection-seam.test.tspackages/2-sql/5-runtime/test/runtime-ctx-passthrough.test.tspackages/2-sql/5-runtime/test/scope-plumbing.test.tspackages/2-sql/5-runtime/test/sql-runtime-abort.test.tspackages/2-sql/5-runtime/test/sql-runtime.test.tspackages/2-sql/5-runtime/test/utils.tspackages/3-extensions/middleware-cache/src/cache-middleware.tspackages/3-extensions/middleware-cache/test/cache-key.test.tspackages/3-extensions/middleware-cache/test/cache-middleware.test.tspackages/3-extensions/mongo/src/runtime/mongo.tspackages/3-extensions/mongo/test/mongo.test.tspackages/3-extensions/mongo/test/mongo.types.test-d.tspackages/3-extensions/postgres/README.mdpackages/3-extensions/postgres/src/runtime/postgres-serverless.tspackages/3-extensions/postgres/src/runtime/postgres.tspackages/3-extensions/sql-orm-client/src/collection-dispatch.tspackages/3-extensions/sql-orm-client/src/collection-mutation-dispatch.tspackages/3-extensions/sql-orm-client/src/collection.tspackages/3-extensions/sql-orm-client/src/grouped-collection.tspackages/3-extensions/sql-orm-client/src/mutation-executor.tspackages/3-extensions/sql-orm-client/src/query-plan-rows.tspackages/3-extensions/sql-orm-client/test/annotations.test.tspackages/3-extensions/sql-orm-client/test/collection-dispatch.test.tspackages/3-extensions/sql-orm-client/test/collection-runtime.test.tspackages/3-extensions/sql-orm-client/test/collection-variant.test.tspackages/3-extensions/sql-orm-client/test/helpers.tspackages/3-extensions/sql-orm-client/test/mutation-executor.test.tspackages/3-extensions/sql-orm-client/test/orm-namespace-crud.test.tspackages/3-extensions/sql-orm-client/test/raw-compiled-query.test.tspackages/3-extensions/sql-orm-client/test/runtime-queryable.types.test-d.tspackages/3-extensions/sqlite/src/runtime/sqlite.tspackages/3-extensions/supabase/README.mdpackages/3-extensions/supabase/src/runtime/supabase-runtime.tspackages/3-extensions/supabase/src/runtime/supabase.tspackages/3-extensions/supabase/test/explicit-namespace-query.integration.test.tspackages/3-extensions/supabase/test/fixtures/example-app/session-queries.tspackages/3-extensions/supabase/test/role-bound-db.types.test-d.tspackages/3-extensions/supabase/test/service-role-refresh-tokens.integration.test.tspackages/3-extensions/supabase/test/skeleton.integration.test.tspackages/3-extensions/supabase/test/supabase-facade.test.tspackages/3-extensions/supabase/test/supabase-runtime.test.tspackages/3-mongo-target/2-mongo-adapter/src/resolve-value.tspackages/3-targets/6-adapters/postgres/test/mixed-case-enum-cast.integration.test.tspackages/3-targets/6-adapters/postgres/test/scalar-list-codec-roundtrip.integration.test.tsskills/prisma-8-extension-upgrade/upgrades/8.0.0-rc.1-to-8.0.0-rc.2/instructions.mdskills/prisma-next-upgrade/upgrades/8.0.0-rc.1-to-8.0.0-rc.2/instructions.mdtest/e2e/framework/test/dml.test.tstest/e2e/framework/test/multi-namespace-runtime.test.tstest/e2e/framework/test/runtime.basic.test.tstest/e2e/framework/test/runtime.joins.test.tstest/e2e/framework/test/runtime.prepared.test.tstest/e2e/framework/test/sqlite/prepared.test.tstest/e2e/framework/test/sqlite/raw-sql.test.tstest/e2e/framework/test/sqlite/runtime.verify-marker.missing-table.test.tstest/e2e/framework/test/sqlite/sql-builder.test.tstest/e2e/framework/test/sqlite/transaction.test.tstest/e2e/framework/test/sqlite/utils.tstest/e2e/framework/test/transaction.test.tstest/integration/test/cross-package/cross-family-middleware.test.tstest/integration/test/cross-package/middleware-cache.test.tstest/integration/test/mongo-runtime/query-builder.test.tstest/integration/test/mongo/execution-abort.test.tstest/integration/test/mongo/expr-filter.test.tstest/integration/test/mongo/query-builder.test.tstest/integration/test/namespaced-accessors-e2e.integration.test.tstest/integration/test/ports/prisma/functional/enums/enums.test.tstest/integration/test/ports/prisma/functional/legacy-aggregate-raw/legacy-aggregate-raw.test.tstest/integration/test/rewriting-middleware.integration.test.tstest/integration/test/runtime.verify-marker.missing-table.integration.test.tstest/integration/test/scalar-lists/psl-list-roundtrip.integration.test.tstest/integration/test/sql-builder/distinct.test.tstest/integration/test/sql-builder/execution-abort.test.tstest/integration/test/sql-builder/execution.test.tstest/integration/test/sql-builder/extension-functions.test.tstest/integration/test/sql-builder/group-by.test.tstest/integration/test/sql-builder/join.test.tstest/integration/test/sql-builder/mutation-defaults.test.tstest/integration/test/sql-builder/mutation.test.tstest/integration/test/sql-builder/order-by.test.tstest/integration/test/sql-builder/pagination.test.tstest/integration/test/sql-builder/raw-sql.integration.test.tstest/integration/test/sql-builder/select.test.tstest/integration/test/sql-builder/subquery.test.tstest/integration/test/sql-builder/where.test.tstest/integration/test/sql-orm-client/collection-mutation-defaults.test.tstest/integration/test/sql-orm-client/count-terminal-interleaving.test.tstest/integration/test/sql-orm-client/delete.test.tstest/integration/test/sql-orm-client/helpers.tstest/integration/test/sql-orm-client/integration-helpers.tstest/integration/test/sql-orm-client/runtime-helpers.tstest/integration/test/sql-orm-client/update.test.ts
💤 Files with no reviewable changes (1)
- packages/2-sql/5-runtime/src/prepared/prepared-statement.ts
fc74d2d to
8e038b7
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/3-targets/7-drivers/postgres/test/driver.prepared.test.ts`:
- Around line 137-155: Update the early-termination test around makeMockClient
and the driver.query loop to track the source or cursor close operation, then
assert that it was invoked after the consumer breaks. Preserve the existing
first-row assertion while explicitly verifying cleanup rather than only
successful iteration.
In
`@skills/prisma-8-extension-upgrade/upgrades/8.0.0-rc.1-to-8.0.0-rc.2/instructions.md`:
- Around line 21-23: Remove or revise the PR `#29910` HTML comment in the
runtime-query-execute-hard-cut instructions so it no longer claims changes are
empty or that downstream translation is unnecessary; if the note belongs to a
different upgrade, move it there instead. Keep the note consistent with the
migration instructions defined in this file.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro Plus
Run ID: 1b426d35-bf15-492f-9440-bcdbded42ba1
📒 Files selected for processing (11)
examples/prisma-8-cloudflare-worker/src/prisma/db.tspackages/2-mongo-family/7-runtime/src/mongo-runtime.tspackages/2-mongo-family/7-runtime/test/mongo-middleware.test.tspackages/3-targets/7-drivers/postgres/src/postgres-driver.tspackages/3-targets/7-drivers/postgres/test/driver.prepared.test.tspackages/3-targets/7-drivers/postgres/test/driver.stream-portal-protection.integration.test.tspackages/3-targets/7-drivers/postgres/test/normalize-error.test.tsscripts/lint-framework-vocabulary.config.jsonskills/prisma-8-extension-upgrade/upgrades/8.0.0-rc.1-to-8.0.0-rc.2/instructions.mdskills/prisma-next-upgrade/upgrades/8.0.0-rc.1-to-8.0.0-rc.2/instructions.mdtest/integration/test/sql-orm-client/runtime-helpers.ts
🚧 Files skipped from review as they are similar to previous changes (4)
- test/integration/test/sql-orm-client/runtime-helpers.ts
- packages/2-mongo-family/7-runtime/src/mongo-runtime.ts
- packages/2-mongo-family/7-runtime/test/mongo-middleware.test.ts
- skills/prisma-next-upgrade/upgrades/8.0.0-rc.1-to-8.0.0-rc.2/instructions.md
8e038b7 to
be82b3b
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/reference/error-reference.md`:
- Around line 594-597: Update the conflicting execute() descriptions throughout
the error reference so they consistently document execute() as the statistics
operation and the query operation as returning streamed rows. Preserve the
existing error-specific details while correcting only the operation/return-value
terminology.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro Plus
Run ID: a63f1e7e-e760-429d-b639-bd56841e0de1
📒 Files selected for processing (4)
docs/reference/error-reference.mdpackages/3-extensions/supabase/test/supabase-runtime.test.tspackages/3-targets/7-drivers/postgres/test/driver.stream-portal-protection.integration.test.tsskills/prisma-8-extension-upgrade/upgrades/8.0.0-rc.1-to-8.0.0-rc.2/instructions.md
🚧 Files skipped from review as they are similar to previous changes (3)
- packages/3-targets/7-drivers/postgres/test/driver.stream-portal-protection.integration.test.ts
- skills/prisma-8-extension-upgrade/upgrades/8.0.0-rc.1-to-8.0.0-rc.2/instructions.md
- packages/3-extensions/supabase/test/supabase-runtime.test.ts
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/2-sql/5-runtime/src/sql-runtime.ts (1)
211-218: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winCorrect the operation-hook documentation.
Lines 213 and 217-218 state that the production pipeline runs
beforeExecute.prepareQueryExecution()runsrunBeforeQueryChain, andprepareExecuteExecution()runsrunBeforeExecuteChain. State that the hook depends on the selected operation.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/2-sql/5-runtime/src/sql-runtime.ts` around lines 211 - 218, Update the operation-hook documentation near lowerToDraft and encodeDraftParams to state that the middleware hook depends on the selected operation: prepareQueryExecution() runs runBeforeQueryChain, while prepareExecuteExecution() runs runBeforeExecuteChain. Remove the claim that the production pipeline uniformly runs beforeExecute, while preserving the explanation of the split lower/encode flow.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/1-framework/1-core/framework-components/README.md`:
- Line 15: Update packages/1-framework/1-core/framework-components/README.md at
line 15 to state that each query() and execute() call creates a
CodecCallContext. Update packages/2-mongo-family/7-runtime/README.md at line 53
by replacing executor and unified-flow descriptions with separate row-query and
statement-statistics operations, reflecting Mongo’s query() and execute() APIs.
In `@packages/2-sql/5-runtime/src/sql-runtime.ts`:
- Around line 183-184: Replace the bare cast in the contentHash callback with
the runtime-specific blindCast helper, using SqlExecutionPlan and the required
explanation string. Import blindCast from `@internal/utils/casts` and preserve the
existing computeSqlContentHash call.
In `@test/e2e/framework/test/sqlite/raw-sql.test.ts`:
- Line 145: Remove the duplicate capturedEntries const declaration in each
affected block, retaining exactly one declaration per block in
test/e2e/framework/test/sqlite/raw-sql.test.ts at lines 145-145 and 183-183, and
test/integration/test/sql-builder/raw-sql.integration.test.ts at lines 198-198
and 241-241.
---
Outside diff comments:
In `@packages/2-sql/5-runtime/src/sql-runtime.ts`:
- Around line 211-218: Update the operation-hook documentation near lowerToDraft
and encodeDraftParams to state that the middleware hook depends on the selected
operation: prepareQueryExecution() runs runBeforeQueryChain, while
prepareExecuteExecution() runs runBeforeExecuteChain. Remove the claim that the
production pipeline uniformly runs beforeExecute, while preserving the
explanation of the split lower/encode flow.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro Plus
Run ID: ce3abf82-8b39-4e65-ac7a-3a096973f0a8
⛔ Files ignored due to path filters (7)
projects/affected-row-counts/design-decisions.mdis excluded by!projects/**projects/affected-row-counts/slices/count-terminals/dispatches/08-revert-unapproved-middleware-design.mdis excluded by!projects/**projects/affected-row-counts/slices/count-terminals/dispatches/09-operation-specific-middleware-hooks-round2.mdis excluded by!projects/**projects/affected-row-counts/slices/count-terminals/dispatches/09-operation-specific-middleware-hooks.mdis excluded by!projects/**projects/affected-row-counts/slices/count-terminals/plan.mdis excluded by!projects/**projects/affected-row-counts/slices/count-terminals/spec.mdis excluded by!projects/**projects/affected-row-counts/spec.mdis excluded by!projects/**
📒 Files selected for processing (64)
docs/reference/error-reference.mdexamples/prisma-8-demo/src/orm-client/find-user-by-id-cached.tsexamples/prisma-8-demo/src/prisma/db.tsexamples/prisma-8-demo/src/prisma/slow-query-warning.tsexamples/prisma-8-demo/test/repositories.integration.test.tsexamples/prisma-8-demo/test/slow-query-warning.test.tsexamples/supabase/test/real-supabase.acceptance.test.tspackages/1-framework/1-core/framework-components/README.mdpackages/1-framework/1-core/framework-components/src/execution/before-execute-chain.tspackages/1-framework/1-core/framework-components/src/execution/run-with-middleware.tspackages/1-framework/1-core/framework-components/src/execution/runtime-core.tspackages/1-framework/1-core/framework-components/src/execution/runtime-error.tspackages/1-framework/1-core/framework-components/src/execution/runtime-middleware.tspackages/1-framework/1-core/framework-components/src/exports/runtime.tspackages/1-framework/1-core/framework-components/test/before-execute-chain.test.tspackages/1-framework/1-core/framework-components/test/mock-family.test.tspackages/1-framework/1-core/framework-components/test/operation-specific-middleware.test.tspackages/1-framework/1-core/framework-components/test/operation-specific-middleware.types.test-d.tspackages/1-framework/1-core/framework-components/test/run-with-middleware.intercept.test.tspackages/1-framework/1-core/framework-components/test/run-with-middleware.test.tspackages/1-framework/1-core/framework-components/test/runtime-core-options.test.tspackages/1-framework/1-core/framework-components/test/runtime-core-options.types.test-d.tspackages/1-framework/1-core/framework-components/test/runtime-core.test.tspackages/1-framework/1-core/framework-components/test/runtime-core.types.test-d.tspackages/1-framework/1-core/framework-components/test/runtime-middleware.types.test-d.tspackages/2-mongo-family/7-runtime/README.mdpackages/2-mongo-family/7-runtime/src/content-hash.tspackages/2-mongo-family/7-runtime/src/mongo-middleware.tspackages/2-mongo-family/7-runtime/src/mongo-runtime.tspackages/2-mongo-family/7-runtime/test/content-hash-guard.test.tspackages/2-mongo-family/7-runtime/test/execute-param-mutator-wiring.test.tspackages/2-mongo-family/7-runtime/test/mongo-middleware.test.tspackages/2-sql/5-runtime/README.mdpackages/2-sql/5-runtime/src/exports/index.tspackages/2-sql/5-runtime/src/middleware/budgets.tspackages/2-sql/5-runtime/src/middleware/lints.tspackages/2-sql/5-runtime/src/middleware/sql-middleware.tspackages/2-sql/5-runtime/src/sql-runtime.tspackages/2-sql/5-runtime/test/before-compile-chain.test.tspackages/2-sql/5-runtime/test/budgets.test.tspackages/2-sql/5-runtime/test/intercept-decoding.test.tspackages/2-sql/5-runtime/test/marker-verification.test.tspackages/2-sql/5-runtime/test/marker-vs-intercept-ordering.test.tspackages/2-sql/5-runtime/test/plan-execution-id.test.tspackages/2-sql/5-runtime/test/prepared.test.tspackages/2-sql/5-runtime/test/raw-connection-seam.test.tspackages/2-sql/5-runtime/test/runtime-ctx-passthrough.test.tspackages/2-sql/5-runtime/test/scope-plumbing.test.tspackages/2-sql/5-runtime/test/sql-runtime.test.tspackages/3-extensions/middleware-cache/README.mdpackages/3-extensions/middleware-cache/src/cache-middleware.tspackages/3-extensions/middleware-cache/test/cache-key.test.tspackages/3-extensions/middleware-cache/test/cache-middleware.test.tspackages/3-extensions/middleware-cache/test/cache-query-only.test.tspackages/3-extensions/postgres/test/postgres-serverless.test.tspackages/3-extensions/supabase/test/explicit-namespace-query.integration.test.tspackages/3-extensions/supabase/test/rls-role-binding.integration.test.tspackages/3-extensions/supabase/test/supabase-runtime.test.tsskills/prisma-8-extension-upgrade/upgrades/8.0.0-rc.1-to-8.0.0-rc.2/instructions.mdskills/prisma-next-upgrade/upgrades/8.0.0-rc.1-to-8.0.0-rc.2/instructions.mdtest/e2e/framework/test/sqlite/raw-sql.test.tstest/integration/test/cross-package/cross-family-middleware.test.tstest/integration/test/cross-package/middleware-cache.test.tstest/integration/test/sql-builder/raw-sql.integration.test.ts
💤 Files with no reviewable changes (1)
- packages/1-framework/1-core/framework-components/test/runtime-core.types.test-d.ts
🚧 Files skipped from review as they are similar to previous changes (17)
- packages/2-sql/5-runtime/test/before-compile-chain.test.ts
- packages/2-sql/5-runtime/test/runtime-ctx-passthrough.test.ts
- packages/2-mongo-family/7-runtime/test/execute-param-mutator-wiring.test.ts
- skills/prisma-next-upgrade/upgrades/8.0.0-rc.1-to-8.0.0-rc.2/instructions.md
- packages/2-sql/5-runtime/test/raw-connection-seam.test.ts
- skills/prisma-8-extension-upgrade/upgrades/8.0.0-rc.1-to-8.0.0-rc.2/instructions.md
- packages/2-sql/5-runtime/test/scope-plumbing.test.ts
- packages/2-sql/5-runtime/test/marker-vs-intercept-ordering.test.ts
- test/integration/test/cross-package/cross-family-middleware.test.ts
- packages/2-sql/5-runtime/test/intercept-decoding.test.ts
- docs/reference/error-reference.md
- test/integration/test/cross-package/middleware-cache.test.ts
- packages/2-mongo-family/7-runtime/test/mongo-middleware.test.ts
- packages/3-extensions/supabase/test/supabase-runtime.test.ts
- packages/2-sql/5-runtime/test/prepared.test.ts
- packages/1-framework/1-core/framework-components/src/execution/runtime-middleware.ts
- packages/2-mongo-family/7-runtime/src/mongo-runtime.ts
eb4669c to
c0ac59a
Compare
|
On it for the distinct findings in this review body: I will update the Mongo codec context comment, replace the run-with-middleware bare cast, and add execute() options coverage to the framework type test. The other listed items are already tracked by their corresponding unresolved inline threads and are recorded as duplicate sub-actions. |
|
On it for the distinct findings in this review body: the prepared-query cleanup is tracked by the existing inline thread, and I will correct the stale PR #29910 upgrade note in the extension upgrade guidance. |
|
On it. I will correct the conflicting execute()/query() terminology in the runtime error reference while preserving the existing error-specific details. |
|
On it for the distinct findings in this review body: the README, SQL cast, and capturedEntries items are tracked by existing inline actions, and I will correct the operation-specific hook documentation in sql-runtime.ts. |
|
On it 👍 I will update the Mongo codec context comment to name both query() and execute(). |
|
Done 👍 Updated the Mongo codec context comment to name both query() and execute(), preserving the signal and author-compatibility details in b82384d. |
|
On it 👍 I will replace the intercepted-row bare double cast with blindCast and preserve behavior. |
|
Done 👍 Replaced the intercepted-row bare double cast with blindCast in 5fa531f; runtime behavior is unchanged. |
|
On it 👍 I will verify and record the execute-options type coverage without duplicating the assertion already present at HEAD. |
|
Done 👍 ExecuteParams[1] already asserts the same readonly signal/scope options union as query at HEAD (from 75d33b4); verified with the framework-components typecheck and made no duplicate change. |
|
On it 👍 I will remove or revise the stale PR #29910 changes: [] note so the extension upgrade guidance matches its hard-cut migration instructions. |
|
On it 👍 I will correct the runtime error reference so query() owns row streaming and execute() is described only as the eager statistics operation. |
Signed-off-by: Steven McClankerton <tatarintsev@prisma.io>
Signed-off-by: Steven McClankerton <tatarintsev@prisma.io>
Signed-off-by: Steven McClankerton <tatarintsev@prisma.io>
Signed-off-by: Steven McClankerton <tatarintsev@prisma.io>
Signed-off-by: Steven McClankerton <tatarintsev@prisma.io>
Signed-off-by: Steven McClankerton <tatarintsev@prisma.io>
Signed-off-by: Steven McClankerton <tatarintsev@prisma.io>
Signed-off-by: Steven McClankerton <tatarintsev@prisma.io>
Signed-off-by: Steven McClankerton <tatarintsev@prisma.io>
Signed-off-by: Steven McClankerton <tatarintsev@prisma.io>
Signed-off-by: Steven McClankerton <tatarintsev@prisma.io>
Signed-off-by: Steven McClankerton <tatarintsev@prisma.io>
Signed-off-by: Steven McClankerton <tatarintsev@prisma.io>
Signed-off-by: Steven McClankerton <tatarintsev@prisma.io>
Signed-off-by: Steven McClankerton <tatarintsev@prisma.io>
Signed-off-by: Steven McClankerton <tatarintsev@prisma.io>
3ce0835 to
a2a67ed
Compare
Signed-off-by: Steven McClankerton <tatarintsev@prisma.io>
Signed-off-by: Steven McClankerton <tatarintsev@prisma.io>
Signed-off-by: Steven McClankerton <tatarintsev@prisma.io>
Signed-off-by: Steven McClankerton <tatarintsev@prisma.io>
## Linked issue Refs [TML-3166](https://linear.app/prisma-company/issue/TML-3166) Delivered by [prisma#29907](prisma#29907), [prisma#29920](prisma#29920), and [prisma#29921](prisma#29921). ## At a glance ```ts interface SqlQueryable { query<Row>(request: SqlExecuteRequest): AsyncIterable<Row> execute(request: SqlExecuteRequest): Promise<{ affectedRows: number }> } ``` The project is complete: count-returning writes use one statement and return the database-reported statistic rather than counting rows from a preceding read. ## Decision Close the affected-row-counts project by preserving its durable architecture and semantics in the canonical ADRs, subsystem documentation, and scorecards, then deleting the transient project workspace. ## Project DoD verification - The SQL driver SPI has separate row-query and statement-statistics operations, with prepared-ness carried by the request handle. - Postgres and SQLite return real `affectedRows` values, and Mongo maps `modifiedCount` or `deletedCount` according to the command kind. - `updateAndCount` and `deleteAndCount` issue one write statement; integration coverage proves the returned count comes from that write. - The pre-`SELECT` fallback and retired operation names are absent. - ADR 210 documents the two-method prepared-statement SPI and `DRIVER.PREPARE_FAILED` under ADR 239. - ADR 215 and the runtime subsystem documentation describe the operation-specific query and execute middleware lifecycles. - SQL and Mongo scorecards record the shipped count-terminal behavior and target-specific semantics. - Manual documentation QA passed for both application users and extension/driver/middleware authors. - The mandatory final retro landed a dispatch-DoR guard requiring explicit design-owner approval for public or cross-family API shapes. - All tracked project artifacts are deleted and no tracked references to the removed workspace remain. ## How it fits together 1. ADR 210 records the two-method SQL driver contract and the runtime-owned prepared-handle lifecycle. 2. ADR 215 and the runtime subsystem page describe `beforeQuery` / `interceptQuery` / `afterQuery` separately from `beforeExecute` / `interceptExecute` / `afterExecute`. 3. The Mongo subsystem and both scorecards state each target's native affected-row semantics and point to qualifying evidence. 4. The reusable process lesson lands in Drive's dispatch Definition of Ready. 5. The transient specs, plans, dispatch briefs, decision log, QA artifacts, and retro log are removed. ## Notes for the reviewer The large runtime-documentation diff replaces stale generic middleware terminology with the operation-specific lifecycle on `main`. ADR 215 preserves the original May 2026 decision and its rationale under a historical section while adding the August 2026 amendment. The manual-QA script, report, and retro were created and committed as close-out evidence before being removed with the rest of the transient workspace; their evidence remains in this branch's signed commit history. ## Testing performed - Manual QA: durable-documentation read-through for application and extension-author audiences — pass, no findings - Local Markdown link validation — no missing links - `pnpm lint:docs` — pass, with pre-existing package README warnings - `git diff --check origin/main...HEAD` — pass - Source and integration behavior — green on merged PR prisma#29921 CI, including Test, Integration Tests, E2E, Coverage, Type Check, Lint, and Supabase Acceptance ## Skill update The existing Prisma Next upgrade instructions shipped with prisma#29921. This close-out adds no new user-facing API change. ## Checklist - [x] All commits are signed off (`git commit -s`) per the DCO. - [x] I read `CONTRIBUTING.md` and the change is scoped to one logical concern. - [x] Tests are n/a for this documentation and project-cleanup PR; merged implementation CI and close-out manual QA provide the behavior evidence. - [x] The PR title is in `TML-NNNN: <sentence-case title>` form. - [x] The Skill update section is filled in. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Query and execute operations now have distinct lifecycles and results: queries stream rows, while executions report affected-row statistics. * SQL and MongoDB provide clearer update and delete counts, including no-op updates and deleted-document totals. * Prepared statement and transaction behavior is documented with clearer lazy execution and resource handling details. * **Documentation** * Updated architecture, middleware, MongoDB, SQL ORM, and scorecard documentation to reflect current behavior and supported operations. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Steven McClankerton <tatarintsev@prisma.io> Co-authored-by: Steven McClankerton <tatarintsev@prisma.io>
Linked issue
Refs TML-3168
Prerequisite: #29907 provides the driver-level
query()/execute()split consumed here.At a glance
This real integration case now gets the count from the single
UPDATE; previously the terminal selected matching rows before writing.Summary
Count-returning writes now report the database's affected-row result from the write itself, closing the race and extra round trip created by a pre-
SELECT. The runtime hard cut makes row queries and statistics execution explicit all the way through middleware and bound scopes.Decision
This PR ships two connected changes:
query()/queryPrepared()for rows orexecute()for statement statistics, with operation-discriminated middleware results.updateAndCountanddeleteAndCountexecute one non-returning write and returnstats.affectedRows, while Mongo preserves its native modified/deleted count semantics through the same vocabulary.Reviewer notes
execute()or statistics offered toquery(); it never converts row length intoaffectedRows.updateAndCount({})remains a zero-statement no-op.modifiedCount; SQL uses each driver's affected-row source.contract.json, andcontract.d.tsare unchanged.How it fits together
operationdiscriminant through interception and completion, preserving cancellation, codecs, telemetry, fresh execution IDs, and lifecycle hooks for both paths.execute(), and return the driver'saffectedRowsunchanged.Behavior changes & evidence
updateAndCountreturns a write-derived count from oneUPDATE. The empty-data case still returns zero without execution. Implementation: collection.ts. Evidence: update.test.ts and count-terminal-interleaving.test.ts.deleteAndCountreturns a write-derived count from oneDELETE. Implementation: collection.ts. Evidence: delete.test.ts.modifiedCount; delete statistics map fromdeletedCount. Implementation: mongo-runtime.ts and collection.ts. Evidence: mongo-middleware.test.ts and collection.test.ts.Compatibility / migration / risk
This is a deliberate public runtime hard cut: row consumers must use
query()/queryPrepared(), andexecute()now means statistics. Upgrade instructions are recorded inskills/prisma-next-upgrade/upgrades/8.0.0-rc.1-to-8.0.0-rc.2/andskills/prisma-8-extension-upgrade/upgrades/8.0.0-rc.1-to-8.0.0-rc.2/. There are no contract artifact or capability changes. The principal risk is missed callers across the broad migration; public type tests, focused package suites, integrations, and E2E coverage exercise the migrated surfaces.Testing performed
pnpm typecheck— 165/165 workspace tasks passed.pnpm lint:deps— 1,921 modules and 2,934 dependencies passed.pnpm test:e2e— 20 files and 112 tests passed.pnpm fixtures:check— passed with no tracked fixture delta.pnpm test:packages— 14,542 tests passed; the command remained red in nine unrelated CLI tests that exceeded their 500 ms timeout.pnpm test:integration— 1,819 tests passed; the command remained red in four CLI journey timeouts and one CLI cleanup-hook timeout.pnpm test:examplespassed all locally runnable example tasks; the Cloudflare Worker suite requires an unavailable Hyperdrive database environment.Follow-ups
Skill update
This public hard cut adds
runtime-query-execute-hard-cutentries at:skills/prisma-next-upgrade/upgrades/8.0.0-rc.1-to-8.0.0-rc.2/instructions.mdskills/prisma-8-extension-upgrade/upgrades/8.0.0-rc.1-to-8.0.0-rc.2/instructions.mdAlternatives considered
SELECTcount: rejected because it adds a round trip and can become stale before the write executes.queryPrepared()covers the existing prepared row use case without speculative API surface.Checklist
git commit -s) per the DCO. The DCO status check will block merge if any commit is missing aSigned-off-by:trailer.n/aif the change is doc-only / refactor with no behavioural delta).TML-NNNN: <sentence-case title>form (Linear ticket prefix + concise title naming the concrete deliverable).n/a — internal only).Summary by CodeRabbit
New Features
query/queryPrepared) from write execution (execute), which now reports affected-row statistics.Documentation
Bug Fixes