JordanMarr / SqlHydra

SqlHydra is a suite of NuGet packages for working with databases in F# including code generation tools and query expressions.
MIT License
212 stars 20 forks source link

Update Upsertions section to add example #69

Closed EverybodyKurts closed 8 months ago

EverybodyKurts commented 8 months ago

Add an example on how to upsert multiple records in a single PostgreSQL statement.

JordanMarr commented 8 months ago

I made one small change (added |> AtLeastOne.tryCreate). While you can technically just use Option.get, it's a foot-gun that circumvents checking that you are not trying to insert an empty list (which will fail as a runtime exception).

Thanks!