rm_record.h

来自「斯坦福大学数据库实现的代码,非常好的.可以了解数据库系统的实现」· C头文件 代码 · 共 38 行

H
38
字号
/* * The RM_Record class defines record objects. To materialize a record, a * client creates an instance of this class and passes it to one of the * RM_FileHandle or RM_FileScan methods that reads a record. */#ifndef RM_RECORD_H#define RM_RECORD_H#include "RM.h"#include "RID.h"class RM_Record {private:	bool bValid; /* False if a record has not already been read into			this RM_Record object using RM_FileScan::GetRec()			or RM_FileHandle::GetNextRec() */	RID  rid; /* Stores the RID of this record */public:	char *pData; /* Stores the data contained in this record */	  RM_Record ();	  ~RM_Record ();	/* This method provides access to the contents (data) of the	 * record. If the method succeeds, pData should point to the	 * contents of the copy of the record created by	 * RM_FileHandle::GetRec() or RM_FileScan::GetNextRec(). */	RC GetData (char *&pData) const;	/* If this method succeeds, rid should contain the identifier for	 * the record. */	RC GetRid (RID &rid) const;	friend class RM_FileHandle;	friend class RM_FileScan;};#endif

⌨️ 快捷键说明

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