[ANN] First release of Mssql

I’m happy to announce the first opam release of Mssql, our FreeTDS-based Async SQL Server client library.

We’ve gone to some trouble to make it safer to use than direct bindings to FreeTDS, with things like parameterized queries, workarounds for insane logic in FreeTDS, and logic to throw exceptions instead of crashing when you try to do things like use a closed DB handle.

We’ve also wrapped everything in background threads and ensured that any FreeTDS calls that perform IO release the runtime lock, so it’s safe to use in an Async app without blocking everything when you do DB calls, and also ensured that if you attempt to use a connection concurrently, everything will just work (although it won’t be any faster).

There’s also a built-in thread pool, although it has some annoying limitations since FreeTDS doesn’t give us low-enough-level control to properly reset connections.

(We made this using Async since that’s what we use, but contact me if you want to add support for Lwt)

7 Likes

Thank you for putting it out there @BrendanLong.

I just gave it a spin last night. I was really excited to find this library, since I need to do some work with SQL Server and I wanted to use OCaml/Reason for it.