forked from metin2/server
1
0
Fork 0
server/libsql/include/CStatement.h

42 lines
822 B
C
Raw Normal View History

2022-03-05 12:44:06 +02:00
#ifndef __INC_METIN_II_LIBSQL_STATEMENT_H__
#define __INC_METIN_II_LIBSQL_STATEMENT_H__
#include "CAsyncSQL.h"
#include <string>
#include <vector>
class CStmt
{
public:
CStmt();
virtual ~CStmt();
bool Prepare(CAsyncSQL * sql, const char * c_pszQuery);
bool BindParam(enum_field_types type, void * p, int iMaxLen=0);
bool BindResult(enum_field_types type, void * p, int iMaxLen=0);
int Execute();
bool Fetch();
void Error(const char * c_pszMsg);
public:
int iRows;
private:
void Destroy();
MYSQL_STMT * m_pkStmt;
std::string m_stQuery;
std::vector<MYSQL_BIND> m_vec_param;
unsigned int m_uiParamCount;
uint64_t * m_puiParamLen;
2022-03-05 12:44:06 +02:00
std::vector<MYSQL_BIND> m_vec_result;
unsigned int m_uiResultCount;
};
#endif