Skip to content

Conversation

@dummdidumm
Copy link
Member

Give more specific variable names for easier understanding

Closes #15278

Give more specific variable names for easier understanding

Closes #15278
@changeset-bot
Copy link

changeset-bot bot commented Feb 9, 2026

⚠️ No Changeset found

Latest commit: 2063528

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@svelte-docs-bot
Copy link


export const getWeather = query.batch(v.string(), async (cities) => {
export const getWeather = query.batch(v.string(), async (cityIds) => {
const weather = await db.sql`
Copy link
Contributor

Choose a reason for hiding this comment

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

Leaving a same comment here. Since this returns an array, wouldn't it be better to rename it to weathers?

Copy link
Member Author

Choose a reason for hiding this comment

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

Weathers is not a thing, there's no plural to weather. I think it's clear enough as is.

Copy link
Contributor

Choose a reason for hiding this comment

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

Weathers does exist as a plural form. Here are some dictionary results:

It would be much more intuitive to grasp that it's an array:

const posts = await db.sql``;
const [post] = await db.sql``;

Thought are other .map() usages that use a singular form.

// not scripts
hashes.script.map((hash) => `'${hash}'`).join(' ')

@benmccann benmccann added the documentation Improvements or additions to documentation label Feb 9, 2026
@benmccann benmccann merged commit 8a59a0d into main Feb 9, 2026
27 checks passed
@benmccann benmccann deleted the query-batch-docs branch February 9, 2026 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: clarify query.batch example code

3 participants