#pragma once
#include "stdarg.h"
#ifndef __MYSQL_H__
#define __MYSQL_H__


class CQueryCounter
{
public:
	unsigned char                                              UnknownData_NULL[0x3C];
public:
	int CQueryCounter_make()
	{
		return CallT<int>(base::CQueryCounter::CQueryCounter_make, this);
	}

	int GetQueryCountTable()
	{
		return CallT<int>(base::CQueryCounter::GetQueryCountTable, this);
	}

	int IncreaseQueryCount(std::string const& a2)
	{
		return CallT<int>(base::CQueryCounter::IncreaseQueryCount, this, a2);
	}

	int LoadQueryTable()
	{
		return CallT<int>(base::CQueryCounter::LoadQueryTable, this);
	}

	int RegisterQuery(char const* a2, int a3, int a4)
	{
		return CallT<int>(base::CQueryCounter::RegisterQuery, this, a2, a3, a4);
	}

	int Reset()
	{
		return CallT<int>(base::CQueryCounter::Reset, this);
	}

	int SaveQuery(char const* a2, int& a3)
	{
		return CallT<int>(base::CQueryCounter::SaveQuery, this, a2, a3);
	}

	int SetResponseTime(double a2)
	{
		return CallT<int>(base::CQueryCounter::SetResponseTime, this, a2);
	}

	int UpdateQueryCounter()
	{
		return CallT<int>(base::CQueryCounter::UpdateQueryCounter, this);
	}

	int setLogDB(bool a2)
	{
		return CallT<int>(base::CQueryCounter::setLogDB, this, a2);
	}

	int CQueryCounter_destroy()
	{
		return CallT<int>(base::CQueryCounter::CQueryCounter_destroy, this);
	}


};

class MySQL
{
public:
	unsigned char                                              UnknownData_NULL[0x4208C];
public:

	int GetQueryCounter()
	{
		return CallT<int>(base::MySQL::GetQueryCounter, this);
	}

	int GetQueryString()
	{
		return CallT<int>(base::MySQL::GetQueryString, this);
	}

	MySQL()
	{
		CallT<int>(base::MySQL::MySQL_make, this);
	}

	int SetQueryCounter(CQueryCounter* a2)
	{
		return CallT<int>(base::MySQL::SetQueryCounter, this, a2);
	}

	int blob_to_str(int a2, void* a3, int a4)
	{
		return CallT<int>(base::MySQL::blob_to_str, this, a2, a3, a4);
	}

	int clear_result_set()
	{
		return CallT<int>(base::MySQL::clear_result_set, this);
	}

	int close()
	{
		return CallT<int>(base::MySQL::close, this);
	}

	int escape_string(char* a2, char const* a3)
	{
		return CallT<int>(base::MySQL::escape_string, this, a2, a3);
	}

	int exec(bool a2)
	{
		return CallT<int>(base::MySQL::exec, this, a2);
	}

	int exec_query()
	{
		return CallT<int>(base::MySQL::exec_query, this);
	}

	int fetch()
	{
		return CallT<int>(base::MySQL::fetch, this);
	}

	int getAffectedRowCount()
	{
		return CallT<int>(base::MySQL::getAffectedRowCount, this);
	}

	int getClientVersion()
	{
		return CallT<int>(base::MySQL::getClientVersion, this);
	}

	int getDBError()
	{
		return CallT<int>(base::MySQL::getDBError, this);
	}

	int getServerVersion()
	{
		return CallT<int>(base::MySQL::getServerVersion, this);
	}

	int get_binary(int a2, void* a3, int a4)
	{
		return CallT<int>(base::MySQL::get_binary, this, a2, a3, a4);
	}

	int get_binary_length(int a2)
	{
		return CallT<int>(base::MySQL::get_binary_length, this, a2);
	}

	int get_byte(int a2, char& a3)
	{
		return CallT<int>(base::MySQL::get_byte, this, a2, a3);
	}

	int get_byte2(int a2, int& a3)
	{
		return CallT<int>(base::MySQL::get_byte2, this, a2, a3);
	}

	int get_char(int a2, char& a3)
	{
		return CallT<int>(base::MySQL::get_char, this, a2, a3);
	}

	int get_float(int a2, float& a3)
	{
		return CallT<int>(base::MySQL::get_float, this, a2, a3);
	}

	int get_int(int a2, int& a3)
	{
		return CallT<int>(base::MySQL::get_int, this, a2, a3);
	}

	int get_int2(int a2, uint& a3)
	{
		return CallT<int>(base::MySQL::get_int2, this, a2, a3);
	}

	int get_longlong(int a2, long long& a3)
	{
		return CallT<int>(base::MySQL::get_longlong, this, a2, a3);
	}

	int get_n_rows()
	{
		return CallT<int>(base::MySQL::get_n_rows, this);
	}

	int get_short(int a2, int& a3)
	{
		return CallT<int>(base::MySQL::get_short, this, a2, a3);
	}

	int get_short2(int a2, short& a3)
	{
		return CallT<int>(base::MySQL::get_short2, this, a2, a3);
	}

	int get_str(int a2, char* a3, int a4)
	{
		return CallT<int>(base::MySQL::get_str, this, a2, a3, a4);
	}

	int get_ubyte(int a2, uchar& a3)
	{
		return CallT<int>(base::MySQL::get_ubyte, this, a2, a3);
	}

	int get_uint(int a2, uint& a3)
	{
		return CallT<int>(base::MySQL::get_uint, this, a2, a3);
	}

	int get_ulong(int a2, ulong& a3)
	{
		return CallT<int>(base::MySQL::get_ulong, this, a2, a3);
	}

	int get_ulonglong(int a2, unsigned long long& a3)
	{
		return CallT<int>(base::MySQL::get_ulonglong, this, a2, a3);
	}

	int get_ushort(int a2, ushort& a3)
	{
		return CallT<int>(base::MySQL::get_ushort, this, a2, a3);
	}

	int init()
	{
		return CallT<int>(base::MySQL::init, this);
	}

	int init_db_handle()
	{
		return CallT<int>(base::MySQL::init_db_handle, this);
	}

	int insert(char const* a2, ...)
	{
		int nSize = 0;
		char buff[1024];
		memset(buff, 0, sizeof(buff));
		va_list args;
		va_start(args, a2);
		nSize = vsnprintf(buff, sizeof(buff), a2, args);
		va_end(args);
		return CallT<int>(base::MySQL::insert, this, buff);
	}

	int is_valid_col(int a2)
	{
		return CallT<int>(base::MySQL::is_valid_col, this, a2);
	}

	int is_valid_data(int a2)
	{
		return CallT<int>(base::MySQL::is_valid_data, this, a2);
	}

	int open(char* a2, char* a3, char* a4, char* a5)
	{
		return CallT<int>(base::MySQL::open, this, a2, a3, a4, a5);
	}

	int open(char* a2, uint a3, char* a4, char* a5, char* a6)
	{
		return CallT<int>(base::MySQL::open2, this, a2, a3, a4, a5, a6);
	}

	int ping()
	{
		return CallT<int>(base::MySQL::ping, this);
	}

	int select(char const* a2, ...)
	{
		int nSize = 0;
		char buff[1024];
		memset(buff, 0, sizeof(buff));
		va_list args;
		va_start(args, a2);
		nSize = vsnprintf(buff, sizeof(buff), a2, args);
		va_end(args);
		return CallT<int>(base::MySQL::select, this, buff);
	}

	int select2()
	{
		return CallT<int>(base::MySQL::select2, this);
	}

	int set_charset_name_option()
	{
		return CallT<int>(base::MySQL::set_charset_name_option, this);
	}

	int set_compress_option()
	{
		return CallT<int>(base::MySQL::set_compress_option, this);
	}

	int set_query(char const* a2, ...)
	{
		int nSize = 0;
		char buff[1024];
		memset(buff, 0, sizeof(buff));
		va_list args;
		va_start(args, a2);
		nSize = vsnprintf(buff, sizeof(buff), a2, args);
		va_end(args);
		return CallT<int>(base::MySQL::set_query, this, buff);
	}

	int set_query2()
	{
		return CallT<int>(base::MySQL::set_query2, this);
	}

	int set_read_default_grp_option()
	{
		return CallT<int>(base::MySQL::set_read_default_grp_option, this);
	}

	int set_reconnect_option()
	{
		return CallT<int>(base::MySQL::set_reconnect_option, this);
	}

	int update(char const* a2, ...)
	{
		int nSize = 0;
		char buff[1024];
		memset(buff, 0, sizeof(buff));
		va_list args;
		va_start(args, a2);
		nSize = vsnprintf(buff, sizeof(buff), a2, args);
		va_end(args);
		return CallT<int>(base::MySQL::update, this, buff);
	}

	~MySQL()
	{
		CallT<int>(base::MySQL::MySQL_destroy, this);
	}



};


#endif // __MYSQL_H__

