GameServer
MySqlConnection.h
[詳解]
1 #ifndef __MYSQLCONNECTION_H__
2 #define __MYSQLCONNECTION_H__
3 
4 #ifdef _WIN32
5 #include <mysql.h>
6 #else
7 #include <mysql/mysql.h>
8 #endif
9 
10 #include "MySqlQuery.h"
11 
16 {
17 
18 public:
19 
20  // コンストラクタ
22 
23  // デストラクタ
25 
26  // 接続.
27  bool Connect(const char *pHost, const char *pUserName, const char *pPassword, const char *pDBName);
28 
29  // 単純なクエリ実行.
30  bool SimpleQuery(const char *pQuery) const;
31 
32  // クエリ生成.
33  MySqlQuery CreateQuery(const char *pQuery) const;
34 
35  // 閉じる.
36  void Close();
37 
38 private:
39 
40  // MySQLへの接続.
41  MYSQL *pConnection;
42 
43 };
44 
45 #endif // #ifndef __MYSQLCONNECTION_H__
bool Connect(const char *pHost, const char *pUserName, const char *pPassword, const char *pDBName)
Definition: MySqlConnection.cpp:17
bool SimpleQuery(const char *pQuery) const
Definition: MySqlConnection.cpp:35
~MySqlConnection()
Definition: MySqlConnection.cpp:11
MySqlConnection()
Definition: MySqlConnection.cpp:5
Definition: MySqlConnection.h:15
void Close()
Definition: MySqlConnection.cpp:51
Definition: MySqlQuery.h:16
MySqlQuery CreateQuery(const char *pQuery) const
Definition: MySqlConnection.cpp:44