⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 oracl.h

📁 随着计算机信息技术的飞速发展
💻 H
📖 第 1 页 / 共 5 页
字号:

	oboolean IsFirst(void) const;
	oboolean IsLast(void) const;

    oboolean IsFieldUpdatable(int index) const;
    oboolean IsFieldUpdatable(const char *fieldname) const;
    oresult SetFieldUpdatable(int index, oboolean update) const;
    oresult SetFieldUpdatable(const char *fieldname, oboolean update) const;

	// Original Column name and update source
	oresult GetOrigFieldIndex(const char *fieldname) const;
	const char * GetFieldName(int index) const;
	const char * GetFieldOriginalName(int index) const;
 	oresult UpdateSource(int index, updsrcs updsrc, const char *source=NULL);
	oresult UpdateSource(const char *fieldname, updsrcs updsrc, const char *source=NULL);
	oresult CopyToClipboard(long NumOfRows);
	oresult CopyToClipboard(long NumOfRows, char colsep, char rowsep);

	oboolean get_CurrentRowModified( void) const;

	OSnapshotID GetSnapshot(void) const throw(OException);
	void SetSnapshot(OSnapshotID* snapID) const throw(OException);

private:
	 char *m_sqlstmt;  // the sql statement that creates the dynaset

	 // internal helper routines
	 oresult Copy(const ODynaset &other);
	 oresult Cleanup(void);
};

// ----- ODynasetMark -----------------------------------------------

class OEXPORT ODynasetMark : public OOracleObject
{
public:
	 // construction & destruction
    ODynasetMark(void); 
	 ODynasetMark(const ODynasetMark &other);
	 ~ODynasetMark(void);
    
    // overloaded operators
	 ODynasetMark &operator=(const ODynasetMark &other);
	 int operator==(const ODynasetMark &other) const;
    int operator!=(const ODynasetMark &other) const;

    
    oresult Close(void);
    oboolean IsOpen(void) const;
    
    // function used by other classes to construct ODynasetMark objects (don't call this!)
    oresult OpenHelper(void *idisp, void *otheri);
    
    char *Internal(void) const;

private:
    char  *m_markdata;  // holds data for bookmark
    
    oresult Cleanup(void);
};

// ----- OField -----------------------------------------------

class OEXPORT OField : public OOracleObject
{
public:
    // construction & destruction
    OField(void);
    OField(const OField &other);
    ~OField(void);              
    
    oresult Close(void);
    
    // overloaded operators
    OField &operator=(const OField &other);
    
    // other objects
    ODynaset GetDynaset(void) const;
    
    // properties
    const char *GetName(void) const; // returns name of field (user doesn't need to free)
    long GetSize(void) const;  // returns length of field
    long GetServerSize(void) const;  // returns length of a field (in server)
    short GetServerType(void) const;
    short GetPrecision(void) const;
    short GetScale(void) const;
    oboolean IsNullOK(void) const;
	 oboolean IsTruncated(void) const;
	 
	 oboolean IsUpdatable(void) const;
	 oresult SetUpdatable(oboolean upd = TRUE);

    // field value
    oresult GetValue(OValue *val) const;  // returns value of field in val
    oresult GetValue(int *val) const;
    oresult GetValue(long *val) const;
    oresult GetValue(double *val) const;
    oresult GetValue(const char **val) const;
    oresult GetValue(void __huge *longval, long len, long *readlen) const;
    oresult SetValue(const OValue &val);  // sets the field to new value
    oresult SetValue(int val);
    oresult SetValue(long val);
    oresult SetValue(double val);
    oresult SetValue(const char *val);
    oresult SetValue(const void __huge *longval, long len); 
	oresult GetValue(OBlob *val) const;
	oresult GetValue(OClob *val) const;
	oresult GetValue(OBfile *val) const;
	oresult GetValue(ORef *val) const;
	oresult GetValue(OObject *val) const;
	oresult GetValue(OCollection *val) const;

	oresult SetValue(const OBlob &val);
	oresult SetValue(const OClob &val);
	oresult SetValue(const OBfile &val);
	oresult SetValue(const ORef &val);
	oresult SetValue(const OObject &val);
	oresult SetValue(const OCollection &val);
    
    // for long fields
    oresult AppendChunk(const void *chunkp, unsigned short numbytes);
	oresult GetChunk(const char **chunkp, long offset, unsigned short numbytes) const;

	oresult GetChunk(const char **chunkp, long offset, unsigned short numbytes,
														unsigned short *bytesread) const;
	// Added for testing
	oresult GetChunk(const void **chunkp, long offset, unsigned short numbytes,
														unsigned short *bytesread) const;
	oresult AppendChunk(const char *chunkp, unsigned short numbytes);

    // getting data (overloaded cast operators)
    operator int() const;
    operator long() const;
    operator double() const;
    operator const char *() const;
	operator OBlob () const throw(OException);
	operator OClob () const	throw(OException);
	operator OBfile () const throw(OException);
	operator OObject () const throw(OException);
	operator ORef () const throw(OException);
	operator OCollection () const throw(OException);

    // function used by other classes to construct OField objects (don't call this!)
    oresult OpenHelper(void *idisp, void *otheri);

	// V2.1 dev - Original field name
	const char	*GetOriginalName (void) const;
	int			GetIndex () {return m_index;}
	oresult		UpdateSource(updsrcs updsrc, const char *source=NULL);

private:
    short  m_index;
    char  *m_name;
    char  *m_data;

    // internal helper routines
    oresult Copy(const OField &other);
    oresult Cleanup(void);   
};

// ----- OFieldCollection -----------------------------------------------

class OEXPORT OFieldCollection : public OOracleCollection
{
public:
    OField GetField(int index) const;
	OField GetField(const char *name) const;
	OField GetFieldOname(const char *oname) const;
     OField GetFieldByOriginalName(const char *oname) const;
    // function used by other classes to construct OFieldCollection objects (don't call this!)
    oresult OpenHelper(void *idisp, void *otheri);  // finish the work of opening the set
};

// ----- OClient -----------------------------------------------

class OEXPORT OClient : public OOracleObject
{
public:
    // construction & destruction
    OClient(void);
    OClient(const OClient &other);
    ~OClient(void);
    
    // use OSession::GetClient to open a client object
    oresult Close(void);

    // Getting other objects
    OSessionCollection GetSessions(void) const;  // get set of sessions

    // overloaded operators
    OClient &operator=(const OClient &other);
    
    // get properties
    const char        *GetName(void) const;        // returns client name.
    
    // function used by other classes to construct OSession objects (don't call this!)
    oresult OpenHelper(void *idisp, void *otheri);

private:
    char *m_name;

    // internal helper routines
    oresult Copy(const OClient &other);
    oresult Cleanup(void);   
};

// ----- OConnection -----------------------------------------------

class OEXPORT OConnection : public OOracleObject
{
public:
    // construction & destruction
    OConnection(void);
    OConnection(const OConnection &other);
    ~OConnection(void);
    
    oresult Close(void);
    
    // getting other objects
    OSession GetSession(void) const;   

    // overloaded operators
    OConnection &operator=(const OConnection &other);
    
    // properties
    const char  *GetConnectString(void) const;  // returns connect string
    const char  *GetDatabaseName(void) const;  // returns database name for this connection

 	// transactions on database
	oresult  BeginTransaction(void);  // start a transaction
    oresult  Commit(oboolean startnew = FALSE);   // commit (may start new transaction)
    oresult  Rollback(oboolean startnew = FALSE); // rolls back transaction (may start new transaction)
    oresult  ResetTransaction(void);  // unconditionally rollback (no advisories)
    
    // function used by other classes to construct OConnection objects (don't call this!)
    oresult OpenHelper(void *idisp, void *otheri);

private:
    char *m_dbname;
    char *m_dbconnect;

    // internal helper routines
    oresult Copy(const OConnection &other);
    oresult Cleanup(void);   
};
 
// ----- OConnectionCollection -----------------------------------------------

class OEXPORT OConnectionCollection : public OOracleCollection
{
public:
    OConnection GetConnection(int index) const;

    // function used by other classes to construct OConnectionCollection objects (don't call this!)
    oresult OpenHelper(void *idisp, void *otheri);  // finish the work of opening the set
};

// ----- OAdvise -----------------------------------------------
 
class OEXPORT OAdvise : public OOracleObject
{
public:
    OAdvise(void);
    OAdvise(const OAdvise &other);
    OAdvise(const ODynaset &odyn);  // construct & open
    virtual ~OAdvise(void);
    
    virtual oresult Open(const ODynaset &odyn);
    virtual oresult Close(void);  // stop the advisory sink
    
    // getting other objects
    ODynaset GetDynaset(void) const;
    
    // overloaded operators
    OAdvise &operator=(const OAdvise &other);
    
    // called before an action takes place
    virtual oboolean ActionRequest(int movekind);  // returns TRUE if action is allowed, FALSE to cancel
    
    // routines called to to notify that action occured
    virtual void ActionNotify(int movekind); 
    
    // routine called on status change
    virtual void StatusChange(int statuskind);
    
private:
    ODynaset  m_oDyn;    // the dynaset we're getting notices from
    
    // private helper routines
    oresult Cleanup(void);
	 oresult Copy(const OAdvise &other);
};

// ----- OParameter -----------------------------------------------

class OEXPORT OParameter : public OOracleObject
{
public:
    OParameter(void);
    OParameter(const OParameter &other);
    ~OParameter(void);
    
    oresult Close(void);
    
    // overloaded operators
    OParameter &operator=(const OParameter &other);
    
    // parameter name
    const char *GetName(void) const;

    short GetServerType(void) const;    

    const char *GetLastErrorText(void ) ;
    
    // parameter value
	 oresult GetValue(OValue *val) const;
	 oresult GetValue(int *val) const;
	 oresult GetValue(long *val) const;
	 oresult GetValue(double *val) const;
	 oresult GetValue(const char **val) const;
	 oresult GetValue(OBlob *val) const;
	 oresult GetValue(OClob *val) const;
	 oresult GetValue(OBfile *val) const;
	 oresult GetValue(OObject *val) const;
	 oresult GetValue(ORef *val) const;
	 oresult GetValue(OCollection *val) const;

	 //multiple cursor return
	oresult GetValue(ODynaset *odyn) const;

    int	    Count (void);
    
    oresult Clear(void);
	oresult SetValue(const OValue &val);
	oresult SetValue(int val);
	oresult SetValue(long val);
	oresult SetValue(double val);
	oresult SetValue(const char *val);
	oresult SetValue(const OBlob &val);
	oresult SetValue(const OClob &val);
	oresult SetValue(const OBfile &val);
	oresult SetValue(const OObject &val);
	oresult SetValue(const ORef &val);
	oresult SetValue(const OCollection &val);

    oresult MinimumSize (long size);
    long    MinimumSize (void);

    // getting data (overloaded cast operators)
    operator int() const;
    operator long() const;
    operator double() const;
    operator const char *() const;
	operator OBlob () const throw(OException);
	operator OClob () const	throw(OException);
	operator OBfile () const throw(OException);
	operator OObject () const throw(OException);

⌨️ 快捷键说明

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