Allow static arguments to Type Provider methods eg M<"ABC">()
This in addition to static arguments to types.
SqlCommandProvider typical usage is
type MyCommand1 = SqlCommandProvider<"SELECT 42", connStr>
type MyCommand2 = SqlCommandProvider<"SELECT 43", connStr>
Some information as connection string and database-level info (user defined types for exaample) can be shared. Only query itself is different. It will look like:
type MyDb = SqlCommandProvider<connStr>
type MyCommand1 = MyDb.GetCommand<"SELECT 42">
type MyCommand2 = MyDb.GetCommand<"SELECT 43">
Shared db definition will bring performance benefits to this particular provider. Sharing types (especially user defined table types used for table-valued parameters) will allow to pipe output of one command into input param of another.
This change will enable to merge SqlCommandProvider and SqlProgrammability into single cohesive type provider
type AdventureWorks = SqlClient<connStr>
Triggered by dsyme tweet
This is now completed and available in preview releases of F# 4.0.
For an early Visual Studio preview release see here (cross platform releases will follow) – http://blogs.msdn.com/b/fsharpteam/archive/2014/11/12/announcing-a-preview-of-f-4-0-and-the-visual-f-tools-in-vs-2015.aspx
Don Syme, F# Language Evolution
Don Syme commented
An early prototype (including a pull request and a sample using it) is detailed at: https://github.com/dsyme/SampleMethStaticParamProvider/blob/master/README.md