-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update content/core/sqlite.fsx
with Quick Start
#840
Comments
So it turns out... maybe I had a stupid? Anyone else looking to fix this issue, I did the below:
And it works! I don't know if my request would necessarily be to add these steps to I'd also like to inquire about what the canonical steps are - even if what I did was actually recommended? Something akin to what SqlProvider.Core.Tests does? Because of course |
I recommend copying the dlls to a separate path, not bin/Release, so that they stay there, and commit the proper files to your repo. The issue is that after .NET Core, the database drivers have become like node modules, referencing half the internet. SQLProvider loads the driver dynamically (there is no fixed dependency on a single driver version), and that flexibility makes usability hard. Depending on your hardware and software environment, you want different versions (x86/x64/..., Mac/Windows/Ubuntu/...). Also, the documentation is hard to keep up-to-date because these drivers often update, and conventions like "If you are using a bundle package, this is done by calling" come from the underlying database driver, not SQLProvider. I will definitely accept PRs for improvements on documentation/user experience. |
There seem to be quite a few open issues regarding using SQLProvider with SQLite regarding dependencies and DLLs.
I understand that possibilities alone of just
is quite a lot before you even begin talking about versions, copying dlls, local environments, etc.
However, could we get an addition or rewrite of sqlite.fsx to have a quick-start for a net9 console app?
My particular issue is that I have copied
Microsoft.Data.Sqlite.dll
ande_sqlite3.dll
to myResolutionPath
, and when I excludeSQLitePCLRaw.core.dll
, I get... Could not load file or assembly 'SQLitePCLRaw.core, Version=2.1.2.1721
, but when I include it I getYou need to call SQLitePCL.raw.SetProvider(). If you are using a bundle package, this is done by calling SQLitePCL.Batteries.Init().
(Docs do not address (?) what to pass toSetProvider
andInit
does nothing).In my case though, I don't really care whether I use
Microsoft.Data.Sqlite
orSystem.Data.SQLite
. I've gotten SQLProvider to work in a notebook but now I can't replicate it. Getting every scenario perfectly working for everyone will probably always be hard to iron out but FSharp.Data is dead simple and I would appreciate having / being able to contribute to an easy onboarding devex for the simplefsproj * net9 * <whatever is easiest>
use case and go from there.The text was updated successfully, but these errors were encountered: