db.h

来自「天之炼狱1服务器端源文件游戏服务端不完整」· C头文件 代码 · 共 25 行

H
25
字号
//--------------------------------------------------------------------------------//// Filename   : DB.h// Written By : Reiot////--------------------------------------------------------------------------------#ifndef __DB_H__#define __DB_H__#include "DatabaseManager.h"#include "Connection.h"#include "Statement.h"#include "Result.h"#define BEGIN_DB try #define BEGIN_DB_EX try #define END_DB(STMT)         catch(SQLQueryException& sqe) { delete STMT; string msg; msg += string(__PRETTY_FUNCTION__); msg += " : "; msg += string(sqe.toString()); filelog("DBError.log", "%s", msg.c_str()); throw(msg.c_str()); } #define END_DB_EX(STMT, MSG) catch(SQLQueryException& sqe) { delete STMT; string msg; msg += string(__PRETTY_FUNCTION__); msg += string(" : "); msg += string(sqe.toString()); msg += string(" : "); msg += string(MSG); filelog("DBError.log", "%s", msg.c_str()); throw(msg.c_str()); } #define NEW_STMT g_pDatabaseManager->getConnection("DARKEDEN")->createStatement()#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?