11 #ifndef _INCLUDE_SQLCONX_H_
12 #define _INCLUDE_SQLCONX_H_
14 #include <drift/DB_Common.h>
15 #include <mysql/mysql.h>
17 #if defined(DSL_DLL) && defined(WIN32)
18 #if defined(DSL_MYSQL_EXPORTS)
19 #define DSL_MYSQL_API extern "C" __declspec(dllexport)
20 #define DSL_MYSQL_API_CLASS __declspec(dllexport)
22 #define DSL_MYSQL_API extern "C" __declspec(dllimport)
23 #define DSL_MYSQL_API_CLASS __declspec(dllimport)
26 #define DSL_MYSQL_API DSL_API_VIS
27 #define DSL_MYSQL_API_CLASS DSL_API_VIS
35 bool Connect(std::string host, std::string user, std::string pass, std::string dbname, uint16_t port=0, std::string charset=
"");
40 std::string GetErrorString();
41 unsigned int GetError();
43 bool NoResultQuery(std::string query);
44 MYSQL_RES *Query(std::string query);
45 uint64_t NumRows(MYSQL_RES *result);
46 bool FetchRow(MYSQL_RES *result,
SC_Row& retRow);
47 bool FreeResult(MYSQL_RES *result);
50 uint64_t InsertID64();
51 uint64_t AffectedRows();
52 uint32_t GetQueryCount();
54 std::string EscapeString(std::string str);
63 std::string host, user, pass, dbname, charset;
65 uint32_t query_count = 0;
Definition: DB_MySQL.h:30
Definition: DB_Common.h:14
Definition: DB_Common.h:26
Definition: DB_Common.h:36