1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 08:47:17 +01:00

Port legacy MySQL implementation.

This commit is contained in:
Sandu Liviu Catalin 2021-06-12 17:51:33 +03:00
parent f5592208fa
commit 425b13afe0
4 changed files with 6048 additions and 0 deletions

View File

@ -152,10 +152,13 @@ endif()
# Does POCO have MySLQ support?
find_package(MySQL)
if(MYSQL_FOUND)
message(STATUS MySQL was enabled)
# Link the libraries
target_link_libraries(SqModule Poco::DataMySQL)
# Inform the plug-in that it can make use of this library
target_compile_definitions(SqModule PRIVATE SQMOD_POCO_HAS_MYSQL=1)
# Include legacy implementation sources
target_sources(SqModule PRIVATE Library/MySQL.hpp Library/MySQL.cpp)
endif()
# Does POCO have PostgreSQL support?
find_package(PostgreSQL)

3369
module/Library/MySQL.cpp Normal file

File diff suppressed because it is too large Load Diff

2670
module/Library/MySQL.hpp Normal file

File diff suppressed because it is too large Load Diff

View File

@ -44,6 +44,9 @@ extern void Register_ZMQ(HSQUIRRELVM vm);
#ifdef SQMOD_POCO_HAS_SQLITE
extern void Register_SQLite(HSQUIRRELVM vm);
#endif
#ifdef SQMOD_POCO_HAS_MYSQL
extern void Register_MySQL(HSQUIRRELVM vm);
#endif
// ------------------------------------------------------------------------------------------------
extern void Register_POCO(HSQUIRRELVM vm);
@ -104,6 +107,9 @@ bool RegisterAPI(HSQUIRRELVM vm)
#ifdef SQMOD_POCO_HAS_SQLITE
Register_SQLite(vm);
#endif
#ifdef SQMOD_POCO_HAS_MYSQL
Register_MySQL(vm);
#endif
Register_POCO(vm);