Skip to content

Conversation

Charles-Gagnon
Copy link
Contributor

Fixes #263

Starting with the newer versions of the SDK it will create an attribute object and then pull the values of the various fields from that. Since this is an enum the default value is "0" - which CommandType doesn't define and so it errors out (null isn't valid).

Having this property be nullable would have been slightly preferable since it isn't actually required, but attribute parameters can't be nullable (https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/attributes/#attribute-parameters). So just setting default to Text instead, which also has the small benefit of making input bindings not need to specify the CommandType if it's text.

@Charles-Gagnon Charles-Gagnon merged commit bf4b440 into main Jun 8, 2022
@Charles-Gagnon Charles-Gagnon deleted the chgagnon/defaultCommandType branch June 8, 2022 20:01
PBBlox pushed a commit to PBBlox/azure-functions-sql-extension that referenced this pull request Apr 6, 2025
* Add default CommandType

* Tests
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.

Output binding errors with microsoft.net.sdk.functions >=4.1.0/>=3.1.0
2 participants