09.04.2013, 19:38
(
Last edited by Dan..; 30/07/2013 at 05:05 PM.
)
MySQL & PostgreSQL Plugin
This plugin provides a set of natives used to communicate with SQL servers like MySQL and PostgreSQL. This plugin is fastest and most feature-rich plugin out yet (better than BlueG, StrickenKid, ADreNaLiNe-DJ). I'm waiting for your bug reports and suggestions. Thank you!Building
- Windows: Open the samp-plugin-sql.sln, choose the configuration that fits you best (Release, Release - MySQL or Release - PgSQL) and hit the `Build` button. Binaries will be located in the bin/ folder.
- Linux: Type in terminal make MYSQL=1 (for MySQL), make PGSQL=1 (for PostgreSQL) or make MYSQL=1 PGSQL=1 (for both). Binaries will be located in the bin/ folder.
- Move the binaries in the plugins/ folder.
- On Windows, you probably need to copy libmysql.dll, libpq.dll and other libraries required (depending on what SQL engines are you using) in the root of the server.
- On Linux, you probably need to copy libmysql.so, libpq.so and other libraries required (depending on what SQL engines are you using) in the root of the server.
- Write the name of the binary at the end of the line containing plugins from server.cfg. On Linux it must contain the extension too!
- Add the #include <sql> at the top of the script which is going to use the plugin.
- This plugin supports multiple connections to different or same servers, MySQL or PostgreSQL.
- This plugin supports both threaded and non-threaded queries, also cached and on-demand ("live", w/e) queries.
- This plugin's natives are very much alike with the SQLite natives. Code can be easily ported.
- It uses same natives for both MySQL and PostgreSQL. You can switch very easily between engines (as long as the queries are compatible.
Quote:
Originally Posted by Fetch about one million rows
This plugin v2.0 - 12178 ms
BlueG's plugin R21 - 53357 ms |