Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FSharp.Data: Use SqlDataProvider without database

I am using FSharp.Data SqlDataProvider (type provider) to access my data. Even though this is very nice way to get data into F# types it obviously requires having a database with correct schema in every development environment where I want to compile the code.

Is there any trick available to not require a database installation with correct schema during compile time? Like static schema file or conditional compilation? (In general the application would be able to execute without having a database installed)

like image 229
plainionist Avatar asked Mar 24 '18 19:03

plainionist


1 Answers

Not having found any better idea I decided to create a SqlLite database file which I simply added so the source control system. This one is then referenced by the type provider at compile time. By that the correct schema us available in each development environment automatically.

like image 90
plainionist Avatar answered Nov 12 '22 20:11

plainionist