FSharp.Data.SqlClient icon indicating copy to clipboard operation
FSharp.Data.SqlClient copied to clipboard

feature request: add parameters and fields description.

Open smoothdeveloper opened this issue 9 years ago • 0 comments

Considering

type MyCommand = SqlCommandProvider<sql, connection>

it would be nice to have

MyCommand.Record.Fields.All : (string * type) list
MyCommand.Record.Fields.field1 : (string * type)
MyCommand.Record.Fields.field2 : (string * type)
// ...
MyCommand.Parameters.All : SqlParameter list // maybe another class is more relevant?
MyCommand.Parameters.param1 : SqlParameter
MyCommand.Parameters.param2 : SqlParameter // maybe another class is more relevant?
// ...

The reason is to help get rid of magic strings and improve static checking of code which still rely on plain System.Data.SqlClient.SqlCommand based on the provided commands.

One reason I have to do that is that I need to strip out the with result sets of my commands to support older versions of SQL Server.

All this would be moot whenever generated types would be landing, but I'm not sure if there is a clear timeframe for this feature.

smoothdeveloper avatar Jan 08 '16 22:01 smoothdeveloper