BadgerDB
 All Classes Namespaces Functions Variables Typedefs Friends Pages
types.h
1 
8 #pragma once
9 
10 namespace badgerdb {
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 {
35 
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 }
bool operator==(const RecordId &rhs) const
Definition: types.h:47
bool operator!=(const RecordId &rhs) const
Definition: types.h:57
std::uint32_t FrameId
Identifier for a frame in buffer pool.
Definition: types.h:25
std::uint32_t PageId
Identifier for a page in a file.
Definition: types.h:15
SlotId slot_number
Definition: types.h:39
PageId page_number
Definition: types.h:34
Identifier for a record in a page.
Definition: types.h:30
std::uint16_t SlotId
Identifier for a slot in a page.
Definition: types.h:20