-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Relational databases not planned? #15
Comments
It's nothing that shouldn't be included. The drivers just have to be reimplemented using TcpConnection/FileStream. I looked into it but realized that I don't have enough time to do it myself and thus didn't add it to the todo list. But I would integrate an implementation if someone writes it. Alternatively, for more uncommon databases than those standard SQL ones, I think a separate library available as a VPM module would be a good idea. |
adamdruppe has given permission to use his mysql binding and under MIT license (It's boost now): https://github.com/adamdruppe/misc-stuff-including-D-programming-language-web-stuff/blob/master/mysql.d It relies on his database interface: https://github.com/adamdruppe/misc-stuff-including-D-programming-language-web-stuff/blob/master/database.d The MySQL library it's linking against is GPL.. Not sure about the implications, but I guess many sites is using the client library without opening the source code, so I don't think it should be a problem. Is this something that could be added if someone took the time to integrate it? |
The problem with the MySQL library is that it doesn't mix well with the asynchronous I/O and would block the event loop for every transaction. The MySQL protocol doesn't seem extremely complicated (http://forge.mysql.com/wiki/MySQL_Internals_ClientServer_Protocol), so it would be possible to write a native driver from scratch without too much effort - at least a useful subset of the protocol. This would also remove the GPL implication. |
Steve Teale has written a native MySQL driver already. It haven't been updated in 6 months (doesn't compile), but I'll take a look: |
i'm +1 on this one and would love to contribute. with one note: linking against libs written in C will make it hard for linux users, as it'd require compiling with GDC, whereas vibe.d at the moment supports DMD only. so a native mysql driver would be most welcome. |
I updated the native driver to support x64 and dmd-trunk: https://github.com/simendsjo/mysqln/tree/compile-on-recent-dmd |
@tomash: Huh? Isn't it usually the other way round? Except for the x86_64 struct ABI issue, linking DMD code against C libraries on *nix is quite painless (after all, we also use glibc, …), while on Windows, the external library has to be compiled using DMC to be accessible from DMD, which doesn't always work. Dynamic loading is of course always an alternative. |
Ehm... Seems the MySQL protocol is GPL.. If you use the protocol documentation to build a native library, you must license it under GPL...
http://forge.mysql.com/w/index.php?title=MySQL_Internals_ClientServer_Protocol&diff=5078&oldid=4374 |
Wasn't it the case that Microsoft tried the other way around and sued the samba project for implementing their proprietary protocol but failed? I think it was ruled that application interfaces cannot be protected. Hmm.. and if it must indeed be GPL licensed, isn't any website that is implemented using such a GPL driver also bound to the GPL, just like any other application using GPL libraries? And by that logic, wouldn't any GPL application implementing any protocol make that protocol GPL'ed? Doesn't seem sound to me. Anyway, if this is really true, it can just be a GPL'ed VPM package and everyone can decide to use it on his/her own. |
Ah.. I see now that this restriction was removed in a revision september 2007. Guess it should be safe to use then. |
How about mysql drivers for python or ruby? They have it figured out for Tomash
|
I remember Steve Teale working on a database interface. Guess the native mysql driver was a part of that. Perhaps someone should ping Steve Teale to see if he would be motivated to continue his work? |
I have created a fork using vibe primitives as mysql-native. If anyone with a running MySQL server wants to try it out, it's there. It should also be usable per VPM by adding the following line the dependencies section of package.json: "mysql-native": ">=0.0.1" |
i'm pretty much sure ruby mysql drivers are NOT gpl-licensed: |
I'll close this one with https://github.com/rejectedsoftware/mysql-native as its outcome. GPL doesn't seem like an issue after all. |
I don't see any notes it todo.txt to support MySQL, SQLite or PostgreSQL. Given these are well known, and still widely popular, I think it makes sense to include them. At least MySQL and SQLite.
The text was updated successfully, but these errors were encountered: