Repository navigation
fix: dbBind() accepts parameters whose names are all empty - #607
Merged
Merged
Conversation
Closes #599. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd5PUWgaCJzotWt9NhJ
Member
Author
Accepted limitationsThe clean review found nothing above Low. No limitation is introduced by this PR.
Generated by Claude Code |
krlmlr
marked this pull request as ready for review
November 29, 2026 12:01
This was referenced Nov 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #599.
Before this change,
dbBind()rejected any parameter list with non-NULLnames, sosetNames(list(1), "")failed with "Cannot use named parameters for anonymous placeholders". It now rejects a list only if some name is neither empty norNA. That matches DBI's specification ("names … must not be empty orNA") and DBItest'sbind_named_param_empty_placeholdersandbind_named_param_na_placeholders, which treat both cases alike. A list with a real name still gets the old error.The same check exists in RSQLite; it was reported on r-dbi/RSQLite#866.
Tests
tests/testthat/test-dbBind.R(new) has two standalone tests: one binds namesc("", NA)and checks the fetched values, and one checks that a real name still errors. Local run against MariaDB 10.11 withNOT_CRAN=true: DBItest passed 8568 checks with 0 failures. The whole suite had one failure, thetest-timezone.R"US/Alaska" error, which also happens onmainin this container. MySQL was not tested: there is no server in this container, and CI's MySQL entries currently run MariaDB (#592).Session: https://claude.ai/code/session_01Hr1rd5PUWgaCJzotWt9NhJ
Generated by Claude Code