1
Fork 0
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:
Mordred 2018-10-26 19:12:55 +02:00
parent 34a5c1d210
commit 423e54d7ec
15 changed files with 31 additions and 25 deletions

View file

@ -2,6 +2,7 @@
#include "MySqlBase.h"
#include "Statement.h"
#include "PreparedStatement.h"
#include <mysql.h>
#include <vector>

View file

@ -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
{

View file

@ -1,6 +1,7 @@
#include "MySqlBase.h"
#include "Connection.h"
#include <memory>
#include <mysql.h>
Mysql::MySqlBase::MySqlBase()
{

View file

@ -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;

View file

@ -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)

View file

@ -3,7 +3,8 @@
#include <memory>
#include "Statement.h"
#include <mysql.h>
typedef struct st_mysql_stmt MYSQL_STMT;
namespace Mysql
{

View file

@ -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 )
{

View file

@ -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;

View file

@ -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()
{

View file

@ -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

View file

@ -38,7 +38,7 @@ if( UNIX )
else()
target_link_libraries( common
PUBLIC
libmysql )
mysql )
endif()
target_include_directories( common

View file

@ -5,6 +5,7 @@
#include "PreparedStatement.h"
#include "Framework.h"
#include <mysql.h>
extern Core::Framework g_fw;

View file

@ -8,6 +8,7 @@
#include "Framework.h"
#include "Logging/Logger.h"
#include <mysql.h>
extern Core::Framework g_fw;

View file

@ -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

View file

@ -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 ) :