📄 connection.h
字号:
#ifndef __CONNECTION_H_
#define __CONNECTION_H_
#include "ocicpp.h"
#include "Cursor.h"
#include "BFile.h"
#include "AQQueue.h"
using std::string;
#if ( OCILIBVERMAJOR>=8 && OCILIBVERMINOR>=1 ) || DOXYGEN
#include "TLob.h"
#endif
namespace OCICPP {
class Connection {
private:
OCIEnv *envhp;
OCIServer *srvhp;
OCIError *errhp;
OCISvcCtx *svchp;
OCISession *authp;
// OCIAuthInfo *authp;
OraText *poolName;
sb4 poolNameLen;
OCICPool *poolhp;
OCITrans *trans; /* Only one transaction allowed per connection */
sword status;
int Initialized;
public:
Connection();
Connection(OCIEnv *env,const string &tnsname,const string &user,const string &password);
~Connection();
void drop();
void init(OCIEnv *env,const string &tnsname,const string &user,const string &password);
/* Obsolete should not be used. */
Cursor *execQuery(const string &);
/* Cursor execQuery(const string &); */
/* Use this one... */
void execQuery(const string &,Cursor &,int);
void execUpdate(const string &);
unsigned int execQueryEx(const string &,Cursor &,int);
unsigned int execUpdateEx(const string &);
/* Transactions */
void transStart(int);
void transCommit();
void transRollback();
/* Advanced query execution mechanism */
void prepare(const string &sql,Cursor &cur,int);
/* Advanced Queueing */
void getQueue(std::string& queue_name, OCICPP::AQQueue& queue);
/* Tlob/BFile support */
void createBFile(const string &,const string &,BFile &);
#if ( OCILIBVERMAJOR>=8 && OCILIBVERMINOR>=1 ) || DOXYGEN
void createTLob(LobType lobtype,CacheMode cachemode,TLob &);
#endif
/* Misc. */
string serverVersion();
};
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -