wisc_db
types.h
1 
8 #pragma once
9 
10 namespace wiscdb {
11 
15 typedef std::uint32_t PageId;
16 
20 typedef std::uint16_t SlotId;
21 
25 typedef std::uint32_t FrameId;
26 
30 struct RecordId {
34  PageId page_number;
35 
39  SlotId slot_number;
40 
47  bool operator==(const RecordId& rhs) const {
48  return page_number == rhs.page_number && slot_number == rhs.slot_number;
49  }
50 
57  bool operator!=(const RecordId& rhs) const {
58  return (page_number != rhs.page_number) || (slot_number != rhs.slot_number);
59  }
60 };
61 
62 }
Definition: buffer.h:14
std::uint16_t SlotId
Identifier for a slot in a page.
Definition: types.h:20
bool operator!=(const RecordId &rhs) const
Definition: types.h:57
Identifier for a record in a page.
Definition: types.h:30
std::uint32_t PageId
Identifier for a page in a file.
Definition: types.h:15
std::uint32_t FrameId
Identifier for a frame in buffer pool.
Definition: types.h:25
SlotId slot_number
Definition: types.h:39
bool operator==(const RecordId &rhs) const
Definition: types.h:47
PageId page_number
Definition: types.h:34