Skip to content

Commit

Permalink
Change TablePage::GetRecord first argument from slot_id to rid
Browse files Browse the repository at this point in the history
Signed-off-by: Wenbo Li <[email protected]>
  • Loading branch information
hnjylwb committed Mar 13, 2024
1 parent cc13749 commit f953ba9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/table/table_page.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ void TablePage::DeleteRecord(slotid_t slot_id, xid_t xid) {
// LAB 1 BEGIN
}

std::unique_ptr<Record> TablePage::GetRecord(slotid_t slot_id, const ColumnList &column_list) {
std::unique_ptr<Record> TablePage::GetRecord(Rid rid, const ColumnList &column_list) {
// 根据 slot_id 获取 record
// 新建 record 并设置 rid
// LAB 1 BEGIN
return nullptr;
}
Expand Down
2 changes: 1 addition & 1 deletion src/table/table_page.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class TablePage {
// 删除记录
void DeleteRecord(slotid_t slot_id, xid_t xid);
// 获取记录
std::unique_ptr<Record> GetRecord(slotid_t slot_id, const ColumnList &column_list);
std::unique_ptr<Record> GetRecord(Rid rid, const ColumnList &column_list);

// Lab 2: 回滚删除操作
void UndoDeleteRecord(slotid_t slot_id);
Expand Down

0 comments on commit f953ba9

Please sign in to comment.