📄 lob.h
字号:
#ifndef __LOB_H_#define __LOB_H_#include "BFile.h"#include "ocicpp.h"#include "OraError.h"#if ( OCILIBVERMAJOR>=8 && OCILIBVERMINOR>=1 ) || DOXYGEN#include "TLob.h"#endifnamespace OCICPP {class Lob {private: OCILobLocator *lob; OCIError *errhp; OCISvcCtx *svchp; LobType type; /* CLOB or BLOB or FILE */ unsigned len; /* Overall length */ unsigned offset; /* Current offset default 1 */ CacheMode cache; /* CACHE_ON or CACHE_OFF not supported yet */ bool wasBound;public: Lob(); Lob(OCISvcCtx *svcctx,OCILobLocator *lob_desc,OCIError *err,LobType type,CacheMode cache_mode); void init(OCISvcCtx *svcctx,OCILobLocator *lob_desc,OCIError *err,LobType type,CacheMode cache_mode); void init(OCIEnv *env,OCISvcCtx *svcctx,OCIError *err); ~Lob(); void drop(); void seek(unsigned offset,LobDirection dir); /* Set's the current position dir is SET or CUR or END similair to stdc seek call */ unsigned tell(); unsigned read(void *buff,int blen); /* returns number of bytes or chracters actually read */ unsigned write(const void *buff,int blen); void trunc(unsigned new_len); /* Truncate lob */ void loadFromBFile(BFile &bfile,unsigned int amount,unsigned int dst_offset,unsigned int src_offset); void loadFromFile(FILE *); void saveToFile(FILE *); string toString(); void setCacheMode(CacheMode mode); /* mode is CACHE_ON or CACHE_OFF */ unsigned getLen() const; void copyFrom(Lob &src_lob,unsigned amount,unsigned dst_off,unsigned src_off); void copyFrom(BFile &src_file,unsigned amount,unsigned dst_off,unsigned src_off); #if ( OCILIBVERMAJOR>=8 && OCILIBVERMINOR>=1 ) || DOXYGEN void copyFrom(TLob &src_file,unsigned amount,unsigned dst_off,unsigned src_off); friend class TLob;#endif friend class Cursor;}; }#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -