|
| RelationFile (Catalog *catalog, BufferManager *buf_mgr, Schema *schema) |
| Constructor. Initializes common state associated with every file, including catalog, buf_mgr, and schema.
|
|
virtual | ~RelationFile () |
| Destructor. Data members are cleaned up, but none of the dynamically allocated data members are deleted. The underlying Unix file is not deleted.
|
|
virtual std::uint32_t | getNumPages () |
| virtual function that returns the number of pages in the file
|
|
virtual std::uint64_t | getNumRecords () |
| virtual function that returns the number of records in the file
|
|
Schema * | getSchema () |
| Returns the schema of the File.
|
|
virtual RecordId | insertRecord (Record record)=0 |
| Virtual method for inserting a Record into the RelationFile.
|
|
virtual void | getRecord (RecordId record_id, Record *record)=0 |
| Virtual method for getting record of the given RecordId.
|
|
virtual void | updateRecord (RecordId record_id, Record record)=0 |
| Virtual method for updating record of the given RecordId.
|
|
virtual void | deleteRecord (RecordId record_id)=0 |
| Virtual method for deleting record of the given RecordId.
|
|
| File (Catalog *catalog, BufferManager *buf_mgr) |
| Constructor. Initializes common state associated with every file, including catalog, buf_mgr, and schema.
|
|
virtual | ~File () |
| Destructor. Data members are cleaned up, but none of the dynamically allocated data members are deleted. The underlying Unix file is not deleted.
|
|
virtual void | createHeader ()=0 |
| Allocates and initializes the header. Is a virtual method to be overridden at each derived class.
|
|
virtual void | flushHeader ()=0 |
| Flushes Header Page to disk. Is a virtual method to be overridden at each derived class.
|
|
FileId | getFileId () |
| Returns the FileId of the File.
|
|
virtual void | printFile () |
| Prints out information and/or the contents of the file. Can be overwritten in derived classes. Useful for debugging and testing purposes.
|
|
PageId | getHeaderId () |
| Returns Header PageId.
|
|
SwatDB RelationFile Class. Represents relation file in the system. It is an abstract class from which lower level relation file implementations (heapfile) inherit. Abstract methods for inserting, updating, and deleting records are defined. There may be other lower level methods that are implementation specific (and hence not defined here).