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

Metadata from SqlCommandProvider

Open jackfoxy opened this issue 9 years ago • 2 comments

Given an instantiated type

type MySqlType = SqlCommandProvider<...>

use cmd = new TestFirstResultSet(conn)
  1. new method
DescribeFirstResult(params : string option, browseInformationMode : BrowseInformationMode)
    BrowseInformationMode.NoInfo 0
    BrowseInformationMode.ForBrowse 1
    BrowseInformationMode.ForCursor 2
  1. new method ShowPlan() returns XML:
SET SHOWPLAN_XML ON;
    GO
<sql from type>
  1. new property value TypeName (returns "MySqlType" in this example)

  2. Might as well cover sys.sp_describe_undeclared_parameters too. (I have no immediate need, but it would cover all the metadata I can think of.)

jackfoxy avatar Feb 08 '16 22:02 jackfoxy

@ntr Reconcile this issue with #184

dmitry-a-morozov avatar Mar 25 '16 00:03 dmitry-a-morozov

@jackfoxy those are great suggestions, along this, I'd like the library to have some of it's currently internal logic packaged as reusable components in a similar fashion as FSharp.Data is done.

I'm considering removing some of the internal and moving the code to Internals module, so consumers who are ok with potential breaking change on those could use them without reflection or pulling / compiling the code in their project.

smoothdeveloper avatar Apr 17 '19 06:04 smoothdeveloper