rid.h

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

H
33
字号
/* *  The RID class defines record identifier objects. A record identifier *  uniquely identifies a record within a given file, based on the record's *  page number in the file and slot number within that page. */#ifndef RID_H#define RID_H#include "RM.h"class RID {private:	PageNum pageNum;	SlotNum slotNum;	bool bValid; /* Is RID a valid record identifier? */public:	  /* Constructs a new RID object */	  RID ();	  /* Constructs a new RID object from the given page and slot	   * numbers */	  RID (PageNum pageNum, SlotNum slotNum);	/* Sets page number to the record indentifier's page number */	RC GetPageNum (PageNum &pageNum) const;	/* Sets slot number to the record indentifier's slot number */	RC GetSlotNum (SlotNum &slotNum) const;	void PrintRid () const;};#endif

⌨️ 快捷键说明

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