C++客户端开发接口库
V5.1.8.15
连接信创集成中间件服务程序的二次开发接口
Toggle main menu visibility
载入中...
搜索中...
未找到
DBTranHelper.h
1
#pragma once
2
#include <string>
3
#include <vector>
4
#include <memory>
5
#include "DBBase.h"
6
#include "MidLinkComm.h"
7
#include "CDBParameter.h"
8
#include "mdwclient_global.h"
9
10
namespace
mdwc
11
{
13
class
MDWC_COMPLILE CDBTranHelper :
public
CDBBase
14
{
15
private
:
17
std::string m_sDBSysName;
19
bool
m_bStartTrans;
21
bool
m_bFreeAutoCommit;
23
bool
m_bDisableTimeOut;
25
int
m_iExecSQLCount;
27
int
m_iTransUID;
28
public
:
30
int
m_iExec_DBTrans
;
31
private
:
32
// 禁止拷贝构造函数
33
CDBTranHelper(
const
CDBTranHelper&) =
delete
;
34
// 禁止拷贝赋值运算符
35
CDBTranHelper& operator=(
const
CDBTranHelper&) =
delete
;
36
43
bool
SendCommand(
const
std::string& sDataPara);
44
51
bool
SendTransCommand(
const
std::string& sCommand);
52
58
bool
ProcCommandResult();
59
public
:
60
62
bool
GetFreeAutoCommit
()
const
{
return
m_bFreeAutoCommit; }
64
void
SetFreeAutoCommit
(
bool
value) { m_bFreeAutoCommit = value; }
65
67
bool
GetDisableTimeOut
()
const
{
return
m_bDisableTimeOut; }
68
70
void
DisableTimeOut(
bool
value);
71
73
bool
TranslateStarted
()
const
{
return
m_bStartTrans; }
74
80
std::string
GetDBSysName
()
const
{
return
m_sDBSysName; }
86
void
SetDBSysName
(
const
std::string& value) { m_sDBSysName = value; }
87
89
bool
HaveNextPack
()
const
{
return
m_bHaveNextPack
; }
90
97
CDBTranHelper
(
const
std::string& sDBSysName,
unsigned
char
uRouteNode = 0);
98
105
CDBTranHelper
(
const
std::string& sDBSysName,
CMidLinkComm
* MidComm);
106
108
~CDBTranHelper
();
109
117
bool
ExecSQL(
const
std::string& sSQLScript, std::shared_ptr<CDBParameter> sSQLParas =
nullptr
);
118
126
bool
ExecProc(
const
std::string& sProcName,
const
std::string& sParameter);
127
135
bool
ExecProc(
const
std::string& sProcName, std::shared_ptr<CDBParameter> sSQLParas);
136
143
bool
StartTran(
const
std::string& sDBSysName =
""
);
144
150
bool
Commit();
151
157
bool
RollBack();
158
164
int
CancelExecute(
bool
bBreakBussiness =
false
);
165
};
166
}
mdwc::CDBBase::m_bHaveNextPack
bool m_bHaveNextPack
定义
DBBase.h:121
mdwc::CDBTranHelper
定义
DBTranHelper.h:14
mdwc::CDBTranHelper::m_iExec_DBTrans
int m_iExec_DBTrans
定义
DBTranHelper.h:30
mdwc::CDBTranHelper::SetFreeAutoCommit
void SetFreeAutoCommit(bool value)
定义
DBTranHelper.h:64
mdwc::CDBTranHelper::HaveNextPack
bool HaveNextPack() const
定义
DBTranHelper.h:89
mdwc::CDBTranHelper::TranslateStarted
bool TranslateStarted() const
定义
DBTranHelper.h:73
mdwc::CDBTranHelper::GetDBSysName
std::string GetDBSysName() const
定义
DBTranHelper.h:80
mdwc::CDBTranHelper::GetDisableTimeOut
bool GetDisableTimeOut() const
定义
DBTranHelper.h:67
mdwc::CDBTranHelper::SetDBSysName
void SetDBSysName(const std::string &value)
定义
DBTranHelper.h:86
mdwc::CDBTranHelper::GetFreeAutoCommit
bool GetFreeAutoCommit() const
定义
DBTranHelper.h:62
mdwc::CMidLinkComm
定义
MidLinkComm.h:50
mdwc
定义
AutoUpdateHelper.h:8
MDWClient
DBTranHelper.h
制作者
1.18.0