Update `content/core/sqlite.fsx` with Quick Start

Open
#840 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
42/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Tech stack
sqlite

Research direction

Start with docs/content/core/sqlite.fsx and the linked SQLite-related issues, then reproduce the net9 console-app scenario with dotnet build. A quick-start should document one workable dependency and DLL setup for the fsproj and show a buildable example; the issue does not choose between Microsoft.Data.Sqlite and System.Data.SQLite.

Written by the indexing model from the issue text.

Description

documentation question sqlite

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

   fsi | fsproj | Polyglot Notebook
   *
   net46 | net8+
   *
   Microsoft.Data.Sqlite | System.Data.SQLite | Mono.Data.SQLite

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 and e_sqlite3.dll to my ResolutionPath, and when I exclude SQLitePCLRaw.core.dll, I get ... Could not load file or assembly 'SQLitePCLRaw.core, Version=2.1.2.1721, but when I include it I get You 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 to SetProvider and Init does nothing).

In my case though, I don't really care whether I use Microsoft.Data.Sqlite or System.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 simple fsproj * net9 * <whatever is easiest> use case and go from there.

As a side note, I am using Ionide, but I am reporting on the output of the dotnet build command. I can figure out tooling once I get this to even compile.

Dominant language
F#
Stars
627
Forks
147
Avg merge
2h 2m
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from fsprojects/SQLProvider

All issues in fsprojects/SQLProvider

Similar issues

More Databases issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.