top | item 13566900

(no title)

lucasmreis | 9 years ago

Amazing - I'm gonna use this in the future :)

discuss

order

daxfohl|9 years ago

It'd be especially nice if database schemas mapped to F# types more readily. JSON db's kinda do it, but with no defined schema and no joins. It seems like it'd be not terribly difficult to augment regular SQL databases with something akin to the F# type system to define table schemas, rather than just flat data in columns. Then "SQL" could be extended to include `match` expressions.

tejasv|9 years ago

I've taken the approach of converting my models to XML, mostly because they map 1:1 from F#-land to XML-land, and I can use SQL Server's XML Indices, but most importantly, I can use XSLT to evolve my persisted models upon change change to F# code.

Then using a bit of F# Quotations, I can convert most match queries to XPath queries and query SQL Server directly (still work-in-progress).

But running into performance problems, so it's not 100% done.

http://stackoverflow.com/questions/41949177/f-data-types-sql...

jackmott|9 years ago

have you seen sqlprovider and sqlcommandprovider?