Skip to content

docs(skills): clarify toArray purpose#994

Merged
aqrln merged 1 commit into
mainfrom
tensordreams-ylpzumktnsrl
Jul 16, 2026
Merged

docs(skills): clarify toArray purpose#994
aqrln merged 1 commit into
mainfrom
tensordreams-ylpzumktnsrl

Conversation

@aqrln

@aqrln aqrln commented Jul 16, 2026

Copy link
Copy Markdown
Member

Linked issue

Summary

Testing performed

Skill update

Checklist

  • All commits are signed off (git commit -s) per the DCO. The DCO status check will block merge if any commit is missing a Signed-off-by: trailer.
  • I read CONTRIBUTING.md and the change is scoped to one logical concern.
  • Tests are updated (or n/a if the change is doc-only / refactor with no behavioural delta).
  • The PR title is in TML-NNNN: <sentence-case title> form (Linear ticket prefix + concise title naming the concrete deliverable). See .claude/skills/create-pr/SKILL.md for the full convention.
  • The Skill update section above is filled in (or stated n/a — internal only).

Notes for the reviewer

Summary by CodeRabbit

  • Documentation
    • Updated guidance on consuming query results with .toArray().
    • Clarified that .toArray() returns a real Promise<Row[]> and is only needed when downstream code requires an actual promise (e.g., a Promise<Row[]> type slot or promise checks).
    • Noted that await and Promise.all/Promise.race can work with the existing thenable directly, and kept the multi-result example using Promise.all(...).then(...) with .toArray() in context.

@aqrln
aqrln requested a review from a team as a code owner July 16, 2026 10:17
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 8d7e21f3-5bb7-4e91-be08-3f8dd51907a7

📥 Commits

Reviewing files that changed from the base of the PR and between a4b10f1 and d76066b.

📒 Files selected for processing (1)
  • skills/prisma-next-queries/SKILL.md

📝 Walkthrough

Walkthrough

Changes

Query consumption documentation

Layer / File(s) Summary
Revise .toArray() consumption guidance
skills/prisma-next-queries/SKILL.md
Explains that .toArray() is appropriate when downstream code requires a genuine Promise<Row[]>, while await, Promise.all, and Promise.race can consume the .all() thenable directly.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Suggested reviewers: wmadden

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the documentation change clarifying the purpose of toArray.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch tensordreams-ylpzumktnsrl

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

@github-actions

Copy link
Copy Markdown

size-limit report 📦

Path Size
postgres / no-emit 158.31 KB (0%)
postgres / emit 131.83 KB (0%)
mongo / no-emit 98.71 KB (0%)
mongo / emit 89.43 KB (0%)
cf-worker / no-emit 185.14 KB (0%)
cf-worker / emit 155.9 KB (0%)

@pkg-pr-new

pkg-pr-new Bot commented Jul 16, 2026

Copy link
Copy Markdown

Open in StackBlitz

@prisma-next/extension-author-tools

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

@prisma-next/mongo-runtime

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

@prisma-next/family-mongo

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

@prisma-next/sql-runtime

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

@prisma-next/family-sql

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

@prisma-next/extension-arktype-json

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

@prisma-next/middleware-cache

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

@prisma-next/mongo

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

@prisma-next/extension-paradedb

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

@prisma-next/extension-pgvector

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

@prisma-next/extension-postgis

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

@prisma-next/postgres

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

@prisma-next/sql-orm-client

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

@prisma-next/sqlite

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

@prisma-next/extension-supabase

npm i https://pkg.pr.new/@prisma-next/extension-supabase@994

@prisma-next/target-mongo

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

@prisma-next/adapter-mongo

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

@prisma-next/driver-mongo

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

@prisma-next/contract

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

@prisma-next/utils

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

@prisma-next/config

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

@prisma-next/errors

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

@prisma-next/framework-components

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

@prisma-next/operations

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

@prisma-next/ts-render

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

@prisma-next/contract-authoring

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

@prisma-next/ids

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

@prisma-next/psl-parser

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

@prisma-next/psl-printer

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

@prisma-next/cli

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

@prisma-next/cli-telemetry

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

@prisma-next/config-loader

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

@prisma-next/emitter

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

@prisma-next/language-server

npm i https://pkg.pr.new/@prisma-next/language-server@994

@prisma-next/migration-tools

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

prisma-next

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

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

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

@prisma-next/mongo-codec

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

@prisma-next/mongo-contract

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

@prisma-next/mongo-value

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

@prisma-next/mongo-contract-psl

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

@prisma-next/mongo-contract-ts

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

@prisma-next/mongo-emitter

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

@prisma-next/mongo-schema-ir

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

@prisma-next/mongo-query-ast

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

@prisma-next/mongo-orm

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

@prisma-next/mongo-query-builder

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

@prisma-next/mongo-lowering

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

@prisma-next/mongo-wire

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

@prisma-next/sql-contract

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

@prisma-next/sql-errors

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

@prisma-next/sql-operations

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

@prisma-next/sql-schema-ir

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

@prisma-next/sql-contract-psl

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

@prisma-next/sql-contract-ts

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

@prisma-next/sql-contract-emitter

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

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

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

@prisma-next/sql-relational-core

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

@prisma-next/sql-builder

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

@prisma-next/target-postgres

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

@prisma-next/target-sqlite

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

@prisma-next/adapter-postgres

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

@prisma-next/adapter-sqlite

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

@prisma-next/driver-postgres

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

@prisma-next/driver-sqlite

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

commit: d76066b

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 `@skills/prisma-next-queries/SKILL.md`:
- Around line 79-88: Update the Promise.all example to pass the `.all()` results
directly instead of calling `.toArray()`. Keep `.toArray()` guidance limited to
APIs requiring a genuine native Promise or an instanceof Promise check, while
preserving the existing destructured users and posts result behavior.
🪄 Autofix (Beta)

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

Run ID: 4e1686bc-16fa-431a-b6f5-f695c08c7d92

📥 Commits

Reviewing files that changed from the base of the PR and between cfea1a2 and a4b10f1.

📒 Files selected for processing (1)
  • skills/prisma-next-queries/SKILL.md

Comment thread skills/prisma-next-queries/SKILL.md Outdated
Signed-off-by: Alexey Orlenko's AI Agent <robot@aqrln.net>
@tensordreams
tensordreams force-pushed the tensordreams-ylpzumktnsrl branch from a4b10f1 to d76066b Compare July 16, 2026 11:35
@aqrln
aqrln merged commit 98cf9c0 into main Jul 16, 2026
21 checks passed
@aqrln
aqrln deleted the tensordreams-ylpzumktnsrl branch July 16, 2026 13:07
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.

2 participants