-
-
Notifications
You must be signed in to change notification settings - Fork 316
Add Proper Nullable support to Procedure Definitions #2937
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Makes sense, since 6 (8) is the current supported .net versions. |
Yeah this behavior is not the best. I could try having a go at this... Am I correct in inferring that the ultimately the parameter types (for postgres) come from PostgresRoutineModelFactory? So if that query is updated to fetch the nullability information, it should be possible to route it back to the |
@spaasis This issue is not about the nullability of parameters and result set properties, but the fact that these pieces of code uses Please create a new issue to improve nullability discovery for postgres schemas (which is what you are referring to, and yes, PostgresRoutineModelfacory is responsible for that discovery) |
@ErikEJ apologies, misunderstood the opening |
@jwyza-pi Is this something you are interested in contributing? 🙏 |
Interested? Yes. But unfortunately, I won't have the capacity to do it until probably sometime in mid-June. :( |
What problem are you trying to solve?
Back in #2261, it was made that the generated code for Stored Procedures was always set to Nullable disable.
However, the real solution should be (imo) properly supporting nullable. If "use-nullable-reference-types" is set to true, then the parameters for generated Sprocs should augmented with the ? so that they are classified as nullable and the "#nullable disable" should not be part of the Procedures class.
eg:
specifically this line would change:
to
The main reason is that right now if the rest of your project uses NRTs, then this shows up as a warning:
You can obviously use the null forgiveness operator (
!
), but that's not the best practice if it can be avoided.Describe the solution you'd like
No response
The text was updated successfully, but these errors were encountered: