btree

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewComparableBTreeIndex added in v0.2.0

func NewComparableBTreeIndex[R record.Record, V record.LessComparable](
	getter record.GetterInterface[R, V],
	maxChildren int,
	uniq bool,
) indexes.Index[R]

func NewIndex

func NewIndex[R record.Record](
	field record.Field,
	compute indexes.IndexComputer[R],
	btree Storage,
	unique bool,
) indexes.Index[R]

Types

type Storage

type Storage interface {
	indexes.Storage
	LessThan(key indexes.Key) (int, []storage.IDIterator)
	LessOrEqual(key indexes.Key) (int, []storage.IDIterator)
	GreaterThan(key indexes.Key) (int, []storage.IDIterator)
	GreaterOrEqual(key indexes.Key) (int, []storage.IDIterator)
	ForKey(key indexes.Key) (int, storage.IDIterator)
	All(callback func(key indexes.Key, records storage.IDStorage))
}

func NewTree

func NewTree(maxChildren int, uniq bool) Storage

Jump to

Keyboard shortcuts

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