1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-27 06:47:45 +00:00
sapphire/src/servers/Server_Common/Database/MySqlBase.h

39 lines
718 B
C
Raw Normal View History

#ifndef SAPPHIRE_MYSQLBASE_H
#define SAPPHIRE_MYSQLBASE_H
#include <boost/shared_ptr.hpp>
#include <mysql.h>
#include <string>
#include <map>
namespace Core
{
namespace Db
{
typedef std::map< enum mysql_option, std::string > optionMap;
class Connection;
class MySqlBase
{
public:
MySqlBase();
~MySqlBase();
Connection * connect( const std::string& hostName, const std::string& userName, const std::string& password );
Connection * connect( const std::string& hostName, const std::string& userName, const std::string& password, const optionMap& map );
std::string getVersionInfo();
private:
MySqlBase(const MySqlBase &);
void operator=(MySqlBase &);
};
}
}
#endif //SAPPHIRE_MYSQLBASE_H