Repository navigation
AddParams on a text command sends only the members its @name markers use (docs corrected, test added) - #129
Merged
Conversation
…re sent (docs corrected, test added) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
electricessence
added a commit
that referenced
this pull request
Nov 12, 2026
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
electricessence
added a commit
that referenced
this pull request
Nov 12, 2026
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
electricessence
added a commit
that referenced
this pull request
Nov 12, 2026
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
electricessence
added a commit
that referenced
this pull request
Nov 12, 2026
Conflicts: the SingleResult wording in mapping.md and the MappedQuery remarks keep master's text with this branch's First and Single additions; whats-new keeps both sets of bullets. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
AddParams(object)on a text command: the article said every member is sent; the code sends only the members the text uses.The question
AddParamsan object that has more members than the command needs? Yes, when the command's parameter names are known: only the members the command declares are sent, and an unused member is ignored. Documented for a stored procedure already; this pins and documents the text-command case too.What was wrong
@namemarkers is matched against them the same way a procedure's declared names are, so a member with no marker is not sent. Every member is sent, named as written, only when the names are not known: a stored procedure on a provider that cannot report its parameter names, or a text command with no@namemarker.What changes
select 1 where a = @id and b = @regionwithAddParams(new { Id = 7, Region = "west", Unrelated = true })sends@idand@region, andUnrelatedis not sent.Checks
🤖 Generated with Claude Code