Re:Rezoom.SQL: Statically typed SQL for F#
by omaranto on Tuesday August 01, 2017 @01:19AM
(#14898077)
I've never used F#, so I might get this completely wrong, but I think they are a practical form of dependently typed programming: a type provider builds new types that depend on values in your program. If you have some sort of schema for data, a type provider could parse it and build appropriate types to hold data that conforms to the schema. A type provider for a database, say, could take a string that specifies a database connection, connect to the database, and then query it to figure out what sorts of tables it holds and then construct F# types capable of holding a record from one of the tables.
[ Parent
| on HN ]
Re:Rezoom.SQL: Statically typed SQL for F#
by jackfoxy on Tuesday August 01, 2017 @02:11AM
(#14898282)
SqlProgrammabilityProvider of http://fsprojects.github.io/FSharp.Data.SqlClient/ basically does just that. I usually prefer the SqlCommandProvider part of this project, as the actual queries are transparent in your F# code.