Dzoukr / Dapper.FSharp

Lightweight F# extension for StackOverflow Dapper with support for MSSQL, MySQL, PostgreSQL, and SQLite
MIT License
365 stars 35 forks source link

Add support for SQLite (Microsoft.Data.SQLite) #73

Closed prosconi closed 1 year ago

prosconi commented 1 year ago

Since #71 was implemented and everything is separated out to their own namespace, I think it makes sense to add a Dapper.FSharp.SQLite namespace with a SQLite specific implementation.

The new implementation can support INSERT OR REPLACE (see: https://www.sqlite.org/lang_conflict.html)

Example implementation of INSERT OR REPLACE

let! conflictCount = 
    insert {
        orReplace
        into personsView
        values modified
    }
    |> conn.InsertAsync

Since SQLite does not support most data types, TypeHandlers should be created (see: https://learn.microsoft.com/en-us/dotnet/standard/data/sqlite/types)

I already have an implementation working locally.

Dzoukr commented 1 year ago

Cool! Free feel to send a PR.

prosconi commented 1 year ago

PR submitted

Dzoukr commented 1 year ago

Perfect, will have a look!

Dzoukr commented 1 year ago

Merged, tested, deployed - thanks for the great work!