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

Supported optional column.Value syntax for left side properties. #47

Closed JordanMarr closed 2 years ago

JordanMarr commented 2 years ago

This provides a fix for issue #46 in the form of this example test case:

    testTask "SqlMethods.isIn with Optional List Values" {
        let query = 
            select {
                for p in table<Person> do
                where (p.MI.Value |=| [ "N"; "M" ])
            }

        Expect.equal query.Where (Column ("Person.MI", In [ "N"; "M" ])) "Expected Person.MI IN ('N', 'M')"
    }
Dzoukr commented 2 years ago

Oh, I thought you'll push it into master and I'll rebase version3 based on this fix being in master. But I'll manage somehow. 😄 Thanks again, man!

Dzoukr commented 2 years ago

I did the cherry pick, put it in master and published fix. Now I'll rebase the version3 based on the new master and we can start putting there the breaking changes. 😄