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
578 stars 146 forks source link

F# 6: Asyncs to Task #767

Closed Thorium closed 2 years ago

Thorium commented 2 years ago

Proposed Changes

Working with databases, all the async { ... } there is, is basically .NET database drivers waiting for database. These are natively Task and not Async operations, and in Dotnet the naming convention is: "Async in method name, returns a Task<_> object".

Because F# didn't have task { ... } the SQLProvider took the way to go witn async { ... } but now, with F# 6 there is a native task in FSharp, and this commit changes the asyncs to tasks.

I was initially thinking of backward compatibility by not changing the existing methods types, but:

So this is a breaking change.