index

package
v0.1.0-alpha.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCorrupt = errors.New("meldbase index: corrupt tree")

Functions

This section is empty.

Types

type Pair

type Pair struct{ Key, Value []byte }

type Tree

type Tree struct {
	// contains filtered or unexported fields
}

func Decode

func Decode(data []byte) (*Tree, error)

func DecodeNodePages

func DecodeNodePages(header TreePageHeader, encoded [][]byte) (*Tree, error)

func New

func New() *Tree

func NewWithOrder

func NewWithOrder(maxKeys int) *Tree

func (*Tree) Delete

func (t *Tree) Delete(key, value []byte) bool

func (*Tree) EncodeNodePages

func (t *Tree) EncodeNodePages() (TreePageHeader, [][]byte, error)

EncodeNodePages returns one independently addressable blob per logical B+Tree node. Child and leaf-next links are stable node ordinals resolved by the checkpoint catalog.

func (*Tree) Get

func (t *Tree) Get(key []byte) [][]byte

func (*Tree) Insert

func (t *Tree) Insert(key, value []byte) bool

func (*Tree) Len

func (t *Tree) Len() int

func (*Tree) MarshalBinary

func (t *Tree) MarshalBinary() ([]byte, error)

MarshalBinary persists the actual node topology. It does not flatten the tree to entries and rebuild it on open.

func (*Tree) Scan

func (t *Tree) Scan(start, end []byte, includeEnd bool) []Pair

type TreePageHeader

type TreePageHeader struct {
	MaxKeys uint16
	Size    uint64
	Root    uint32
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL