📄 ociconnection.h
字号:
// OCIConnection.h: interface for the OCIConnection class.
//
//////////////////////////////////////////////////////////////////////
#ifndef _OCI_CONNECTION_H_
#define _OCI_CONNECTION_H_
#include <oci.h>
#include "IConnection.h"
class OCIConnection : public db::IConnection
{
friend class OCIDBDriver;
private:
OCIConnection();
protected:
virtual ~OCIConnection();
public:
//创建CallableStatement,用于调用存储过程
virtual db::ICallableStatement *PrepareCall(const std::string &sql);
//创建IStatement
virtual db::IStatement *CreateStatement();
//关闭连接
virtual void Close();
//设置提交模式
virtual void SetAutoCommit(bool autoCommit);
//取提交模式
virtual bool GetAutoCommit();
//提交在该连接上所做的所有操作
virtual void Commit();
//回滚在该连接上所做的所有操作
virtual void Rollback();
private:
OCIEnv* m_envhp;//OCI Env Handle
OCISvcCtx* m_svchp;//OCI service Handle
OCIError* m_errhp;//OCI Error Handle
OCIServer* m_srvhp;//OCI server handle
OCISession* m_authp;//OCI authentication handle
bool m_autoCommit;
};
#endif // _OCI_CONNECTION_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -