To download this library for your Linux/Mac installation, enter this on your command line:
DreamDownload byond://Dantom.DB##version=6 Emulator users, in the BYOND pager go to File | Open Location and enter this URL:byond://Dantom.DB##version=6 |
Dantom.DB is compatible with unix & Windows (as of BYOND release 413). Originally written by Dan; currently maintained by Nadrew.
As of this writing, Dantom.DB supports access to MySQL databases (either local or remote). If you only require a local database, you are probably better off using the built-in SQLite database datum instead of Dantom.DB, as it is simpler and more efficient. Installation: Dantom.DB relays SQL commands from your game/program to the remote server. In order to do this, it makes calls to a "client connector" library that can speak the protocol. So you have to install this first. We recommend using Maria DB's connector due to their active development and permissive (LGPL) license. You can install the client connector for your particular system from the MariaDB download repository (be sure to download or build the 32-bit versions only!) or compiled for BYOND usage here:
To use the packages, simply copy the included .dll or .so file to your BYOND/bin folder (where DreamDaemon resides). If you are running a version of BYOND prior to 507, after installation, rename (or symlink) libmariadb.dll -> libmysql.dll (Windows) or libmariadb.so -> libmysqlclient.so (Linux/FreeBSD). Updates: v0.6 * Updated the documentation. * Commented out DBQuery.SetConversion(), my tests show it doing absolutely nothing to the resulting data. * Moved the defines into their own file to reduce the clutter in core.dm * Cleaned up the commenting of the code and the code itself a bit more. v0.5 * Added DBConnection.SelectDB() see db.html for details. * Changed all global constants to quicker #defines. * Added global variables DB_SERVER and DB_PORT to help SelectDB() out. * Moved this information and the core code into seperate files. v0.4 * Cleaned up the code even more. Rewrote the argument names for the procs to be less cryptic. * Added a few comments here and there. * Sped up various procs by "modernizing" some of the code inside of them. * Wrote some actual documentation for the library, since as of 4.13 it should get a bit more usage. v0.3 * Fixed long-standing bug with the connection process, adding a workaround to a strange BYOND bug. * Updated all of the command arguments to not match local variables, as it was causing tons of issues. * The arguments aren't named very well, but you can tell what they do. * Added GetColumnData() function to the DBQuery datum, this function will allow you to obtain a list of table data referenced by name and not by index number. v0.2 Cleaned up the code significantly. v0.1 Initial release. |
Please support BYOND through Membership or a donation!
Samoaremo: (Apr 1 2019, 3:22 am)
Well, I use additional database solutions to expand my working environment. Have a fetish for integration different databases to my current system to experiment a bit.
Xirre: (Sep 28 2015, 12:28 am)
Well, I finally decided to quit being lazy and finally moved my project to my linux server. I ran in to this problem and saw that you guys still haven't found a solution. So, I googled a little bit (literally no longer than 5 mins).
The fix is absolutely simple. Instead of putting it in byond/bin.... put it in /lib. I currently have it in /lib, byond/bin, and my working directory for my project. But, /lib should be just fine. Nadrew, it'd be nice if this could start looking in the correct place (byond/bin). Not sure if you can change that. I haven't found a darn thing in my code that allowed me to change the pathing. Looks like it has to do with something else. Enjoy the fix, guys. FKI: (Jun 20 2015, 1:22 am)
Lavitiz wrote:
I've had a few issues trying to use Dantom.DB after setting up my new linux server. Having this same issue using Ubuntu. Can't seem to find a solution. Lavitiz: (Mar 6 2015, 11:51 pm)
I've had a few issues trying to use Dantom.DB after setting up my new linux server.
I've placed libmariadb.so inside the BYOND/bin directory like the hub says and I'm still receiving the following error: libmariadb.so: cannot open shared object file: No such file or directory Dantom.DB seems to work fine on Windows. My linux server is running Debian 7. Pirion: (Mar 31 2014, 6:03 pm)
DBConnection.SelectDB() uses the constants rather than the instance vars for Server and Port when it builds the DBI. This would be more consistent to use the Instance variables.
|
Related Libraries
|
|||||||||||||||||||||||||
More Libraries by Dantom
|
Copyright © 2024 BYOND Software.
All rights reserved.