def header_bytes(self) -> AnyStr: return b''.join([ int_to_bytes(self.PAGE_TYPE, 1), int_to_bytes(len(self.cells), 2), int_to_bytes(512 - self.payload_size(), 2), int_to_bytes(self.page_number), int_to_bytes(self.page_parent), self.cell_locations_bytes()])
def cell_locations_bytes(self) -> AnyStr: locations_bytes = b'' location = 512 for row_id in self.cells: location -= len(self.cells[row_id]) locations_bytes += int_to_bytes(location, 2) return locations_bytes
def header_bytes(self) -> AnyStr: return int_to_bytes(self.left_child_page) + int_to_bytes(self.row_id)
def header_bytes(self) -> bytes: return int_to_bytes(len(self.values), 1) + bytes([value.get_type_number() for value in self.values])
def header_bytes(self) -> AnyStr: return int_to_bytes(len(self.record), 2) + int_to_bytes(self.row_id)