1#ifndef __DCL_MYSQL_CONNECTION_H__
2#define __DCL_MYSQL_CONNECTION_H__ 20031025_20250414
4#include <mysql/mysql.h>
5#include <mysql/mysqld_error.h>
7#if MYSQL_VERSION_ID < 32224
8#error "invalid mysql version"
15#define BLOB_MAXSIZE (100 * 1024 * 1024)
24 ByteString __lastErrorMessage;
39 virtual bool __open(
const char* _pszConnString,
size_t _n);
41 virtual bool __execute(
const char* pszSQL,
size_t _n);
69 __lastErrorMessage = mysql_error(
connHandle());
71 __lastErrorMessage.clear();
75 const ByteString& _message,
81 __lastErrorMessage = _message;
85#define __SET_ERROR(_error) \
86 setErrorStatus(_error, __THIS_FILE__, __LINE__)
88#define __SET_ERROR_MSG(_msg) \
89 setErrorStatus(_msg, __THIS_FILE__, __LINE__)
#define DECLARE_CLASSINFO(class_name)
virtual bool __startTrans()
virtual bool __rollbackTrans()
void setErrorStatus(SQL::Error _error, const wchar_t *_filename, int _line)
MyConnection(const wchar_t *_serverTitle)
virtual bool __commitTrans()
virtual bool __createQueryInstance(SQL::Query **_ppQuery)
virtual bool __execute(const char *pszSQL, size_t _n)
virtual bool __getServerInfo(char *_buffer, size_t *_size)
MYSQL * connHandle() const
virtual bool __open(const char *_pszConnString, size_t _n)
virtual bool __getErrorMessage(char *_buffer, size_t *_size)
__PROTECTED const wchar_t int _line
__PROTECTED const wchar_t * _filename