Skip to content

docs: Clarify the fetch_no_return_value spec - #588

Merged
krlmlr merged 2 commits into
mainfrom
claude/fix-409-fetch-no-return-value
Nov 28, 2026
Merged

krlmlr merged 2 commits into
mainfrom
claude/fix-409-fetch-no-return-value

Conversation

@krlmlr

@krlmlr krlmlr commented Nov 28, 2026 •

Copy link
Copy Markdown
Member

This rewords the spec text of the fetch_no_return_value test in R/spec-result-fetch.R and regenerates man/spec_result_fetch.Rd. The old sentence said that a result set from dbSendStatement() "can be fetched and return an empty data frame", which read as an invitation to fetch it. The new text states that dbFetch() on such a result set returns an empty data frame with a warning, that these result sets are meant for side effects only and should not be fetched, and that dbSendQuery() is the function for queries that return data. The wording follows the suggestion by Michael Chirico in the issue. Test behavior is unchanged: devtools::test() gives the same counts as on main (670 tests, 9695 expectations, 0 failures, 64 skips).

Closes #409.

A clean review found nothing above Low; one point is addressed in the second commit (the spec now names CREATE TABLE and INSERT), the other is listed under Accepted limitations.

Requested in #585.

https://claude.ai/code/session_01Hr1rd7ccM8Y4Gr9rgiWjgH


Generated by Claude Code

The spec now states that `dbFetch()` on a result set from `dbSendStatement()` returns an empty data frame with a warning,
and that such result sets are meant for side effects and should not be fetched.
It points to `dbSendQuery()` for queries that return data.
Wording suggested by Michael Chirico.

Closes #409.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Hr1rd7ccM8Y4Gr9rgiWjgH
The test runs a `CREATE TABLE` statement,
so "data manipulation query" undersold what the spec covers.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Hr1rd7ccM8Y4Gr9rgiWjgH

krlmlr commented Nov 28, 2026

Copy link
Copy Markdown
Member Author

Accepted limitations

From the clean review of 582e385, which found nothing above Low. The other Low finding was fixed in be70402: the spec now names CREATE TABLE and INSERT instead of saying "data manipulation query".


Generated by Claude Code

@krlmlr
krlmlr merged commit b68cadc into main Nov 28, 2026
17 checks passed
@krlmlr
krlmlr deleted the claude/fix-409-fetch-no-return-value branch November 28, 2026 07:54
@krlmlr krlmlr mentioned this pull request Nov 28, 2026
16 of 20 tasks
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.

Clarify fetch_no_return_value test: shouldn't call dbFetch() on a dbSendStatement() result

2 participants