[−][src]Struct stellar_sql::index::btree::BPlusTree
B+ Tree
Internal Node
+---------------------------+ |P0|K1||P1|K1|| ... ||Pn|Kn| +---------------------------+ K: Key Value P(n-1): Pointer to the page with Kn-1 <= Value < Kn
Leaf Node
+-----------------------------------+ |P0||R0|K0||R1|K1|| ... ||Rn|Kn||P1| +-----------------------------------+ K: Key Value R: Record pointer P0: Previous page pointer P1: Next page pointer
Fields
pid: u32
node_type: NodeType
key_type: DataType
capacity: usize
ptr_size: usize
key_size: usize
row_ptr_size: Option<usize>
ptrs: Vec<u32>
keys: Vec<T>
rows: Option<Vec<(u32, usize)>>
nodes: Vec<Box<Self>>
height: u32
Methods
impl<T: PartialOrd> BPlusTree<T>
[src]
fn node_type(&self) -> &NodeType
[src]
fn find_ptr(arr: &Vec<T>, left: usize, right: usize, val: T) -> usize
[src]
find_ptr: upper-bounded binary searching the key to find the page
Internal Node:
+-------------+ |P0| Key=2 |P1| +-------------+
- Find Key=1 -> P0
- Find Key=2 -> P1
- Find Key=3 -> P1
Trait Implementations
impl<T: PartialOrd> Tree<T> for BPlusTree<T>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.