bulk

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(iter iterator.UnsafeIterator, alloc Allocator, p *pager.Pager) (uint64, error)

Build creates a new B-Tree from a sorted iterator.

func BuildWithOptions

func BuildWithOptions(iter iterator.UnsafeIterator, alloc Allocator, p *pager.Pager, opts BuildOptions) (uint64, error)

BuildWithOptions creates a new B-Tree from a sorted iterator with custom options.

Types

type Allocator

type Allocator interface {
	Alloc(hint uint64) (uint64, error)
}

type BuildOptions

type BuildOptions struct {
	LeafPrefixCompression bool
	LeafColumnar          bool
	InternalBaseDelta     bool
	PackedValuePtr        bool
	LeafPageLog           LeafPageAppender
}

type LeafPageAppender added in v0.4.0

type LeafPageAppender interface {
	AppendLeafPage(leafPage []byte) (page.ValuePtr, error)
}

LeafPageAppender persists leaf pages as value-log records and returns their pointers.

When BuildOptions.LeafPageLog is non-nil, BuildWithOptions writes leaf pages via this interface and returns LeafRef ids (encoded from the returned ValuePtr) in internal children and as the tree root when the height is 1.

Jump to

Keyboard shortcuts

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