Skip to content

Node.js: Clarify Consistent Return Values#2690

Open
sjvans wants to merge 5 commits into
mainfrom
consistent-return-values
Open

Node.js: Clarify Consistent Return Values#2690
sjvans wants to merge 5 commits into
mainfrom
consistent-return-values

Conversation

@sjvans

@sjvans sjvans commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@sjvans sjvans requested a review from BobdenOs June 29, 2026 10:28
@sjvans sjvans marked this pull request as ready for review June 29, 2026 10:28
Comment thread node.js/app-services.md Outdated
BobdenOs
BobdenOs previously approved these changes Jun 29, 2026
Comment thread node.js/app-services.md
inserted[0] // same row (materialized above)
```

For `UPDATE`, `UPSERT`, and `DELETE`, the array is reserved for rows returned by a SQL `RETURNING` clause — not yet supported, so currently always empty:

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.

I'm note sure if I understand this sentence.
What is described in the first part is how it should be but it's not yet supported? Or what is not yet supported if the first part is how it works?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

we will add support for returning, which allows to specify which data i want back (bundle roundtrips to db). that will be the content of the array. since we don't yet support returning, the array is always empty. but the "shape" of the result is now established, namely an array with a property affected: <number>

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.

Suggested change
For `UPDATE`, `UPSERT`, and `DELETE`, the array is reserved for rows returned by a SQL `RETURNING` clausenot yet supported, so currently always empty:
For `UPDATE`, `UPSERT`, and `DELETE`, the array is reserved for rows returned by a SQL `RETURNING` clause. But `RETURNING` is not yet supported, so the array currently is always empty:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants