00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00027 #pragma once
00028
00029 #include "MyMySQLPPResult.h"
00030
00031 class CMyMySQLPPConnection
00032 {
00033 private:
00034 MYSQL *m_con;
00035 public:
00036 CMyMySQLPPConnection(void);
00037 ~CMyMySQLPPConnection(void);
00038 BOOL Connect(const char* host, const char* user, const char* password, const char* database = NULL, unsigned int port = 3306, const char* unix_socket = NULL, unsigned int client_flag = 0);
00039 void Close(void);
00040 BOOL Ping(void);
00041 char* GetClientInfo(void);
00042 char* GetHostInfo(void);
00043 unsigned int GetProtocolInfo(void);
00044 char* GetServerInfo(void);
00045 __int64 AffectedRows(void);
00046 BOOL ChangeUser(const char* user, const char* password, const char* db);
00047 const char* CharacterSetName(void);
00048 unsigned int ErrorNumber(void);
00049 char* Error(void);
00050 __int64 InsertID(void);
00051 char* Info(void);
00052 BOOL Kill(unsigned long pid);
00053 BOOL ListDatabases(CMyMySQLPPResult* result, const char* wild = NULL);
00054 BOOL ListFields(CMyMySQLPPResult* result, const char* table, const char* wild);
00055 BOOL DropDatabase(const char* db);
00056 BOOL ListProcesses(CMyMySQLPPResult* result);
00057 BOOL ListTables(CMyMySQLPPResult* result, const char* wild);
00058 BOOL Options(enum mysql_option option, const char* arg);
00059 BOOL Query(const char* query);
00060 unsigned long RealEscape(char* to, char* from, unsigned long length);
00061 BOOL RealQuery(const char* query, unsigned long length);
00062 BOOL Reload(void);
00063 BOOL SelectDatabase(const char* db);
00064 BOOL Shutdown(void);
00065 char* Status(void);
00066 BOOL StoreResult(CMyMySQLPPResult* result);
00067 unsigned long ThreadID(void);
00068 BOOL UseResult(CMyMySQLPPResult* result);
00069 };