mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-27 14:57:44 +00:00
Fixing mysql includes
This commit is contained in:
parent
34a5c1d210
commit
423e54d7ec
15 changed files with 31 additions and 25 deletions
1
deps/mysqlConnector/Connection.cpp
vendored
1
deps/mysqlConnector/Connection.cpp
vendored
|
@ -2,6 +2,7 @@
|
|||
#include "MySqlBase.h"
|
||||
#include "Statement.h"
|
||||
#include "PreparedStatement.h"
|
||||
#include <mysql.h>
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
|
3
deps/mysqlConnector/Connection.h
vendored
3
deps/mysqlConnector/Connection.h
vendored
|
@ -2,9 +2,10 @@
|
|||
#define SAPPHIRE_CONNECTION_H
|
||||
|
||||
#include <memory>
|
||||
#include <mysql.h>
|
||||
#include <map>
|
||||
|
||||
typedef struct st_mysql MYSQL;
|
||||
enum mysql_option;
|
||||
|
||||
namespace Mysql
|
||||
{
|
||||
|
|
1
deps/mysqlConnector/MySqlBase.cpp
vendored
1
deps/mysqlConnector/MySqlBase.cpp
vendored
|
@ -1,6 +1,7 @@
|
|||
#include "MySqlBase.h"
|
||||
#include "Connection.h"
|
||||
#include <memory>
|
||||
#include <mysql.h>
|
||||
|
||||
Mysql::MySqlBase::MySqlBase()
|
||||
{
|
||||
|
|
5
deps/mysqlConnector/MySqlBase.h
vendored
5
deps/mysqlConnector/MySqlBase.h
vendored
|
@ -2,14 +2,15 @@
|
|||
#define SAPPHIRE_MYSQLBASE_H
|
||||
|
||||
#include <memory>
|
||||
#include <mysql.h>
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
enum mysql_option;
|
||||
|
||||
namespace Mysql
|
||||
{
|
||||
|
||||
using optionMap = std::map< enum mysql_option, std::string >;
|
||||
using optionMap = std::map< enum ::mysql_option, std::string >;
|
||||
|
||||
class Connection;
|
||||
|
||||
|
|
1
deps/mysqlConnector/PreparedStatement.cpp
vendored
1
deps/mysqlConnector/PreparedStatement.cpp
vendored
|
@ -5,6 +5,7 @@
|
|||
#include <variant>
|
||||
#include <errmsg.h>
|
||||
#include <string.h>
|
||||
#include <mysql.h>
|
||||
|
||||
static const unsigned int MAX_SEND_LONGDATA_BUFFER = 1 << 18; //1<<18=256k (for istream)
|
||||
static const unsigned int MAX_SEND_LONGDATA_CHUNK = 1 << 18; //1<<19=512k (for string)
|
||||
|
|
3
deps/mysqlConnector/PreparedStatement.h
vendored
3
deps/mysqlConnector/PreparedStatement.h
vendored
|
@ -3,7 +3,8 @@
|
|||
|
||||
#include <memory>
|
||||
#include "Statement.h"
|
||||
#include <mysql.h>
|
||||
|
||||
typedef struct st_mysql_stmt MYSQL_STMT;
|
||||
|
||||
namespace Mysql
|
||||
{
|
||||
|
|
1
deps/mysqlConnector/ResultSet.cpp
vendored
1
deps/mysqlConnector/ResultSet.cpp
vendored
|
@ -7,6 +7,7 @@
|
|||
#include <vector>
|
||||
#include <string.h>
|
||||
#include <algorithm>
|
||||
#include <mysql.h>
|
||||
|
||||
Mysql::ResultSet::ResultSet( MYSQL_RES* res, std::shared_ptr< Mysql::Statement > par )
|
||||
{
|
||||
|
|
5
deps/mysqlConnector/ResultSet.h
vendored
5
deps/mysqlConnector/ResultSet.h
vendored
|
@ -4,9 +4,12 @@
|
|||
#include <vector>
|
||||
|
||||
#include "ResultSetBase.h"
|
||||
#include <mysql.h>
|
||||
#include <memory>
|
||||
|
||||
typedef char **MYSQL_ROW;
|
||||
typedef struct st_mysql_res MYSQL_RES;
|
||||
typedef struct st_mysql_field MYSQL_FIELD;
|
||||
|
||||
namespace Mysql
|
||||
{
|
||||
class Statement;
|
||||
|
|
1
deps/mysqlConnector/Statement.cpp
vendored
1
deps/mysqlConnector/Statement.cpp
vendored
|
@ -2,6 +2,7 @@
|
|||
#include "Connection.h"
|
||||
#include "ResultSet.h"
|
||||
#include "mysql_util.h"
|
||||
#include <mysql.h>
|
||||
|
||||
std::shared_ptr< Mysql::Connection > Mysql::Statement::getConnection()
|
||||
{
|
||||
|
|
2
deps/mysqlConnector/mysql_util.h
vendored
2
deps/mysqlConnector/mysql_util.h
vendored
|
@ -27,8 +27,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <mysql.h>
|
||||
|
||||
typedef struct st_mysql_field MYSQL_FIELD;
|
||||
#ifndef UL64
|
||||
#ifdef _WIN32
|
||||
#define UL64(x) x##ui64
|
||||
|
|
|
@ -38,7 +38,7 @@ if( UNIX )
|
|||
else()
|
||||
target_link_libraries( common
|
||||
PUBLIC
|
||||
libmysql )
|
||||
mysql )
|
||||
endif()
|
||||
|
||||
target_include_directories( common
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
#include "PreparedStatement.h"
|
||||
#include "Framework.h"
|
||||
#include <mysql.h>
|
||||
|
||||
extern Core::Framework g_fw;
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include "Framework.h"
|
||||
|
||||
#include "Logging/Logger.h"
|
||||
#include <mysql.h>
|
||||
|
||||
extern Core::Framework g_fw;
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@ set_target_properties( sapphire_lobby
|
|||
VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/"
|
||||
)
|
||||
target_link_libraries( sapphire_lobby
|
||||
PRIVATE
|
||||
common )
|
||||
PRIVATE
|
||||
common mysql )
|
||||
if( UNIX )
|
||||
target_link_libraries( sapphire_lobby
|
||||
PRIVATE
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
|
||||
#include <Connection.h>
|
||||
#include <Network/Connection.h>
|
||||
#include <Network/Hive.h>
|
||||
#include <Network/PacketContainer.h>
|
||||
|
||||
#include "Network/GameConnection.h"
|
||||
#include "ServerZone.h"
|
||||
#include "Framework.h"
|
||||
|
||||
#include <Version.h>
|
||||
#include <Logging/Logger.h>
|
||||
#include <Config/ConfigMgr.h>
|
||||
|
||||
#include <MySqlBase.h>
|
||||
#include <Connection.h>
|
||||
|
||||
#include <Network/Connection.h>
|
||||
#include <Network/Hive.h>
|
||||
|
||||
#include <Exd/ExdDataGenerated.h>
|
||||
#include <Network/PacketContainer.h>
|
||||
#include <Database/DatabaseDef.h>
|
||||
#include <Util/Util.h>
|
||||
|
||||
#include "Actor/Player.h"
|
||||
#include "Actor/BNpcTemplate.h"
|
||||
|
||||
#include "Network/GameConnection.h"
|
||||
|
||||
#include "Session.h"
|
||||
|
||||
#include "Zone/TerritoryMgr.h"
|
||||
|
@ -26,13 +26,6 @@
|
|||
#include "Script/ScriptMgr.h"
|
||||
#include "Linkshell/LinkshellMgr.h"
|
||||
|
||||
#include "ForwardsZone.h"
|
||||
|
||||
#include <Util/Util.h>
|
||||
#include <thread>
|
||||
|
||||
#include "Framework.h"
|
||||
|
||||
extern Core::Framework g_fw;
|
||||
|
||||
Core::ServerZone::ServerZone( const std::string& configName ) :
|
||||
|
|
Loading…
Add table
Reference in a new issue