sds_bptree_node(3)

🌸 NAME 🌸

sds_bptree_node β€” okay so bestie, welcome to the sds_bptree_node(3) page from the Library Functions Manual. This is literally the node struct at the heart of the B+Tree situation, and it's giving main character energy. Periodt.

✨ SYNOPSIS ✨

#include <sds.h>

πŸŽ€ Data Fields πŸŽ€

  • void * keys [SDS_BPTREE_DEFAULT_CAPACITY]
  • void * values [SDS_BPTREE_BRANCH]
  • uint32_t item_count
  • uint32_t level
  • uint64_t txn_id
  • struct _sds_bptree_node * parent

πŸ’– Detailed Description πŸ’–

This is the core of the B+Tree structures, no cap. This node represents the branches and the leaves of the structure. It's the whole tree-node vibe check.

🫢 Field Documentation 🫢

🌟 uint32_t sds_bptree_node::item_count

The number of values currently stored in this structure. That's it β€” that's the count.

🌟 void* sds_bptree_node::keys[SDS_BPTREE_DEFAULT_CAPACITY]

Statically sized array of pointers to the keys of this structure. Lowkey iconic.

🌟 uint32_t sds_bptree_node::level

This number of "rows" above the leaves this node is. 0 represents a true leaf node, anything greater is a branch. So 0 is leaf energy, and bigger than 0 is branch era.

🌟 struct _sds_bptree_node* sds_bptree_node::parent

Back reference to our parent. This is faster than creating a traversal list during each insertion (by a large factor). Not me being obsessed with a back pointer, but it's a huge speed flex.

🌟 uint64_t sds_bptree_node::txn_id

The id of the transaction that created this node. This is used so that within a transaction, we don't double copy values if we already copied them. No double-copying, bestie.

🌟 void* sds_bptree_node::values[SDS_BPTREE_BRANCH]

Statically sized array of pointers to values. This is tagged by the level flag. If level is 0, this is a set of values that have been inserted by the consumer. If the level is > 0, this is the pointers to further node structs.

In a leaf, this is [value, value, value, value, value, link -> ]

In a non-leaf, this is [link, link, link, link, link, link]

πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for dirsrv from the source code.


Cute sign-off: this page is from dirsrv, Version 3.3.0 β€” that's the source/version footer tea. The date slot didn't show up in this footer, so it's giving mystery. sds_bptree_node(3) out. πŸ’…βœ¨

πŸ“¦ where this page comes from
  • centos-stream 10: 389-ds-base-devel 3.3.0-4.el10 Β· GPL-3.0-or-later WITH GPL-3.0-389-ds-base-exception AND (Apache-2.0 OR Apache-2.0 WITH LLVM-exception OR MIT) AND (Apache-2.0 OR LGPL-2.1-or-later OR MIT) AND (Apache-2.0 OR MIT) AND (MIT OR Apache-2.0) AND Unicode-3.0 AND (MIT OR Unlicense) AND Apache-2.0 AND MIT AND MPL-2.0 AND Zlib
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms