Skip to content

Commit

Permalink
Delete index cell by Cursor::delete()
Browse files Browse the repository at this point in the history
  • Loading branch information
kawasin73 committed Nov 17, 2023
1 parent c47ba8e commit f1b8a5f
Show file tree
Hide file tree
Showing 5 changed files with 384 additions and 13 deletions.
10 changes: 8 additions & 2 deletions src/btree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,12 @@ impl BtreePageType {
self.0 & (MASK) == MASK
}

#[inline]
pub fn is_index_interior(&self) -> bool {
const MASK: u8 = LEAF_FLAG | INDEX_FLAG;
self.0 & (MASK) == INDEX_FLAG
}

/// The btree page header size.
///
/// * Returns 8 if this is a leaf page.
Expand Down Expand Up @@ -811,11 +817,11 @@ pub fn allocate_from_unallocated_space(
}

/// Write a table leaf cell to the specified offset.
pub fn write_leaf_cell<P: Payload<()>>(
pub fn write_leaf_cell(
buffer: &mut PageBufferMut,
offset: usize,
cell_header: &[u8],
payload: &P,
payload: &dyn Payload<()>,
n_local: u16,
overflow_page_id: Option<PageId>,
) {
Expand Down
Loading

0 comments on commit f1b8a5f

Please sign in to comment.