Repository navigation
Default CommandType to Text and Direction to Input - #372
Merged
Giorgi merged 1 commit intoOct 20, 2026
Merged
Conversation
IDbCommand.CommandType: "The default is Text." DbParameter.Direction: "The default is Input." Both auto-properties started at 0, which is not a CommandType or ParameterDirection value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Coverage Report for CI Build 39415705919Coverage increased (+0.06%) to 92.552%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
This branch is waiting to be deployed
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.
DuckDBCommand.CommandTypeandDuckDBParameter.Directionare auto-properties with no initializer, so a new command or parameter reports0, which is not a defined value of either enum.The contract
Text."Input."Before / after
Code that branches on these (for example
if (command.CommandType == CommandType.Text)in a data layer, or output-parameter handling that checksDirection) currently takes the wrong path for a freshly created object.Change
Initialize both properties to their documented defaults. Tests:
DuckDBCommandTests.CommandTypeDefaultsToText,ParameterCollectionTests.ParameterDirectionDefaultsToInput(constructor, name/value constructor, andCreateParameter()). The full test suite passes (7535 tests).Conformance tests:
CommandType_text_by_default,Parameter_default_Direction_is_input.Found by the pengdows ADO.NET conformance suite, which runs the documented
System.Data.Commoncontract against every provider; each failure it reports cites the learn.microsoft.com sentence the provider departs from.🤖 Generated with Claude Code