On Mon, 18 Jan 2016 10:31:21 GMT, Martin Tschierschke wrote:

Hi, for my first little vibe.d program, i am using
dependency "mysql-d" version="~>0.3.2"

now I realized, that there are three packages offering mysql connect in the DUB package registry:

mysql-lited 0.2.23, 27 days ago 2015-Feb-24 Lightweight native MySQL/MariaDB driver

mysql-native 0.1.3, 5 months ago 2012-May-19 A native MySQL driver implementation based on Steve Teale's original

mysql-d 0.3.2, 4 months ago 2014-Jun-17 Mysql client C library binding.

I started experimenting with mysql-d from dub, because
it has the highest version number.

(simply inserting:
dependency "mysql-d" version="~>0.3.2"
in dub.sdl)

In the vibe.d documentation at: http://vibed.org/features#productivity
is a link to mysql-d/mysql-native forked from simendsjo/mysqln ? So please give me a hint, should I change and what to insert in sub.sdl?

Thank you.

MySQL-lited was built as a practical and tidier (less stress on the GC) alternative to MySQL-native. It has been deployed to production since August 2015 with no issues, connecting about 30 machines to MariaDB 10.1, serving about 4 million queries of varying complexity a day, as a core component of our business infra.

It does require vibe.d at the moment but it would be trivial to write a blocking socket implementation, as the socket type is a template argument with a tiny interface.

It does not implement the whole MySQL protocol, but almost anything a modern high performance app would need is there.
We also have a bunch of helpers built on top of it that I plan to release at some point.

Documentation is sort of lacking, but I suppose the interface is so simple and intuitive that almost anyone with previous D and SQL experience should be able to use it by looking at the examples.

I add features as we need them, and since it's been pretty stable up to now, commits are scarse, which helps keeping it that way. I am planning to implement the text protocol in the next month, most likely.
Typically I fix bugs as soon as I know about them.

The JSON type that you note is implemented as raw strings at the moment, so you need to parse it manually, but I plan to add helpers for that as well when we need it for our business. Luckily vibe has a nice JSON module to aid that, if you need it.

We don't use ORMs, so the driver was not developed with that in mind at all, since D's introspection makes it very elegant to work with raw SQL.

Also, if your DB is hosted locally, it is still suboptimal to use the C bindings as it will still block while the query executes, which is not negligible for large tables or complex queries.

Lastly, contributions are more than welcome, even if just documentation or bug reports :)

Hope this helps folk deciding on a package in the future.