Scroll to navigation

sds_bptree_node(3) Library Functions Manual sds_bptree_node(3)

NAME

sds_bptree_node

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. This node represents the branches and leaves of the structure.

Field Documentation

uint32_t sds_bptree_node::item_count

The number of values currently stored in this structure.

void* sds_bptree_node::keys[SDS_BPTREE_DEFAULT_CAPACITY]

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

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.

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).

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.

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.

Version 3.1.1 dirsrv