|
| static void | InsertChild (ART &art, Node &node, const uint8_t byte, const Node child) |
| | Insert a child at byte.
|
| static void | DeleteChild (ART &art, Node &node, const uint8_t byte) |
| | Delete the child at byte.
|
| static NodeHandle< BaseNode > | New (ART &art, Node &node) |
| | Get a new BaseNode handle and initialize the base node.
|
| static void | ReplaceChild (BaseNode &n, const uint8_t byte, const Node child) |
| | Replace the child at byte.
|
| static unsafe_optional_ptr< Node > | GetChild (BaseNode &n, const uint8_t byte, const bool unsafe=false) |
| | Get the child at byte.
|
| static unsafe_optional_ptr< Node > | GetNextChild (BaseNode &n, uint8_t &byte) |
| | Get the first child greater than or equal to the byte.
|
| static void | Iterator (BaseNode< CAPACITY, TYPE > &n, F &&lambda) |
|
|
static constexpr NType | NODE_16 = NType::NODE_16 |
|
static constexpr uint8_t | CAPACITY = 16 |
◆ InsertChild()
| void duckdb::Node16::InsertChild |
( |
ART & | art, |
|
|
Node & | node, |
|
|
const uint8_t | byte, |
|
|
const Node | child ) |
|
static |
Insert a child at byte.
153745 {
153746 {
153747 NodeHandle<Node16> handle(art, node);
153748 auto &n = handle.Get();
153749 if (n.count != CAPACITY) {
153750 InsertChildInternal(n, byte, child);
153751 return;
153752 }
153753 }
153754
153755
153756 auto node16 = node;
153757 Node48::GrowNode16(art, node, node16);
153759}
static void InsertChild(ART &art, Node &node, const uint8_t byte, const Node child)
Insert a child at byte.
Definition duckdb.cpp:155333
◆ DeleteChild()
| void duckdb::Node16::DeleteChild |
( |
ART & | art, |
|
|
Node & | node, |
|
|
const uint8_t | byte ) |
|
static |
Delete the child at byte.
153761 {
153762 {
153763 auto handle = DeleteChildInternal(art, node, byte);
153764 auto &n = handle.Get();
153765 if (n.count >= Node4::CAPACITY) {
153766 return;
153767 }
153768 }
153769
153770 auto node16 = node;
153771 Node4::ShrinkNode16(art, node, node16);
153772}
◆ GrowNode4()
| void duckdb::Node16::GrowNode4 |
( |
ART & | art, |
|
|
Node & | node16, |
|
|
Node & | node4 ) |
|
staticprivate |
153774 {
153775 {
153776 NodeHandle<Node4> n4_handle(art, node4);
153777 auto &n4 = n4_handle.Get();
153778
153779 auto n16_handle =
New(art, node16);
153780 auto &n16 = n16_handle.Get();
153781 node16.SetGateStatus(node4.GetGateStatus());
153782
153783 n16.count = n4.count;
153784 for (uint8_t i = 0; i < n4.count; i++) {
153785 n16.key[i] = n4.key[i];
153786 n16.children[i] = n4.children[i];
153787 }
153788 }
153790}
static NodeHandle< BaseNode > New(ART &art, Node &node)
Definition duckdb.cpp:57961
static void FreeNode(ART &art, Node &node)
Free the node.
Definition duckdb.cpp:154622
◆ ShrinkNode48()
| void duckdb::Node16::ShrinkNode48 |
( |
ART & | art, |
|
|
Node & | node16, |
|
|
Node & | node48 ) |
|
staticprivate |
We shrink at < Node48::SHRINK_THRESHOLD.
153792 {
153793 {
153794 auto n16_handle =
New(art, node16);
153795 auto &n16 = n16_handle.Get();
153796 node16.SetGateStatus(node48.GetGateStatus());
153797
153798 NodeHandle<Node48> n48_handle(art, node48);
153799 auto &n48 = n48_handle.Get();
153800
153801 n16.count = 0;
153802 for (uint16_t i = 0; i < Node256::CAPACITY; i++) {
153803 if (n48.child_index[i] != Node48::EMPTY_MARKER) {
153804 n16.key[n16.count] = UnsafeNumericCast<uint8_t>(i);
153805 n16.children[n16.count] = n48.children[n48.child_index[i]];
153806 n16.count++;
153807 }
153808 }
153809 }
153811}
The documentation for this class was generated from the following file: