fsprojects / FSharp.Data.SqlClient

A set of F# Type Providers for statically typed access to MS SQL database
http://fsprojects.github.io/FSharp.Data.SqlClient/
Other
204 stars 71 forks source link

Issue 420: restored TVP column ordering to, expected, column_id #421

Closed suou-ryuu closed 2 years ago

suou-ryuu commented 2 years ago

Addresses Issue #420

smoothdeveloper commented 2 years ago

@suou-ryuu it makes sense, I think I've only used them by specifying the argument name in the constructor (which I still recommend to do disregarding this fix).

I'll check in greater detail & thanks for the bug report with matching PR!

suou-ryuu commented 2 years ago

I think I've only used them by specifying the argument name in the constructor

Interesting point. I'll recommend, to my team, they use named arguments in future TVP code :)

I'll check in greater detail

Thank you!

thanks for the bug report with matching PR!

My pleasure 😄

smoothdeveloper commented 2 years ago

Note that the same recommendation applies for the SQL parameter names of the commands, until https://github.com/fsharp/fslang-suggestions/issues/414 is implemented (and leveraged in this library).

Reason is if you shuffle the variables order in the SQL statements, and several have same type, it will still compile silently while having changed the semantics of the code.

smoothdeveloper commented 2 years ago

a new release should show up with this fix, thanks again!

https://www.nuget.org/packages/FSharp.Data.SqlClient/2.1.2

suou-ryuu commented 2 years ago

a new release should show up with this fix, thanks again!

Fantastic. Thank you for the quick turnaround