bulk

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: MIT Imports: 6 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
	EntryRevisions        bool
	LeafPageLog           LeafPageAppender
}

type LeafPageAppender added in v0.4.0

type LeafPageAppender interface {
	AppendLeafPage(leafPage []byte) (page.LeafLogPtr, 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 stores explicit leaf-log child references in the bottom internal level. The returned root is always a normal index page ID.

type LeafPageBatchAppender added in v0.6.0

type LeafPageBatchAppender interface {
	AppendLeafPages(leafPages [][]byte) ([]page.LeafLogPtr, error)
}

Jump to

Keyboard shortcuts

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