FSharp.Data.SqlClient
FSharp.Data.SqlClient copied to clipboard
.NET 4.5 optimized version
The .NET 4.5 specific version can leverage BCL built-it support for async ops (ExecuteNonQueryAsync, ExecuteReaderAsync) including not available on .NET 4 connection.OpenAsync(). Also sqlDataReader.ReadAsync() (issue #15)
How do you envision this? Do we need 4.0 compat, or can it be abandoned? .Net 4.5 doesn't support Windows XP, but other than that, I can't think of a reason to bother with keeping a 4.0 version around.
On a side note, I've always wondered about SqlDataReader.ReadAsync, the overhead of asyncing it must be massive? I've never tried it, but I would think it is too fine-grained? Will have to benchmark that some time.
I think .NET 4.5 adoption is not wide enough to abandon ver 4.0 completely.
I have exactly same thoughts about SqlDataReader.ReadAsync - overhead of one-row retrieval should be big enough to compensate async. @tpetricek mentioned once that @ptrelford had real use case in production code where he needed per-row async.
For now let's just the issue open.
Maybe it's OK, if .NET 4.5 version of FSharp.Data.SqlClient will have some additional functionality..
Some features like issue #15 can be implemented only on .NET 4.5. Opening connection asynchronously too. Also, because we might see some performance improvements on 4.5 because built-in async task-based ops can have better in-lining. Exception handling story for async operations is better on 4.5 All above either advance or not pressing issues. I would like to see at least one user request before we'll think implementing those.