indexutil

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IndexByteValue

func IndexByteValue(b *bolt.Bucket, value []byte, recordId int64) error

IndexByteValue indexes a value and recordId tuple creating multimap from value to lists of associated recordIds.

func IndexRemoveByteValue

func IndexRemoveByteValue(b *bolt.Bucket, value []byte, recordId int64) error

Types

type Collector

type Collector func(IndexIterator) []int64

func CollectAll

func CollectAll() Collector

type IndexIterator

type IndexIterator interface {
	Next() (int64, bool)
}

func IndexSearchByteValue

func IndexSearchByteValue(b *bolt.Bucket, value []byte) IndexIterator

IndexSearchByteValue searches the index given a value and returns an iterator over the associated recordIds.

type IndexSearchIterator

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

func (*IndexSearchIterator) Next

func (i *IndexSearchIterator) Next() (int64, bool)

func (*IndexSearchIterator) Seek

func (i *IndexSearchIterator) Seek(id int64) (int64, bool)

type JoinIterator

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

func NewJoinIterator

func NewJoinIterator(iters ...IndexIterator) *JoinIterator

func (*JoinIterator) Next

func (j *JoinIterator) Next() (int64, bool)

type SeekableIndexIterator

type SeekableIndexIterator interface {
	IndexIterator
	Seek(int64) (int64, bool) // seek to the first recordId >= id and return it or return false.
}

Jump to

Keyboard shortcuts

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