fsprojects / SQLProvider

A general F# SQL database erasing type provider, supporting LINQ queries, schema exploration, individuals, CRUD operations and much more besides.
https://fsprojects.github.io/SQLProvider
Other
572 stars 146 forks source link

Simple implementation of left join with non-foreign keys #590

Closed Thorium closed 5 years ago

Thorium commented 5 years ago

This is proposed fix for #588

It's not having support of leftOuterJoin Linq-operator nor making working with F# query { ... } simple.

But it does allow left join to non-foreign-key columns with op_bangbang (!!).

        query {
            for cust in dc.Main.Customers do
            join ord in (!!) dc.Main.Orders on (cust.CustomerId = ord.CustomerId)
            select (cust.CustomerId, ord.OrderDate)
        } |> Seq.toList