indexutil

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: GPL-3.0 Imports: 4 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

func CollectFirstN

func CollectFirstN(firstN int) Collector

func CollectLastN

func CollectLastN(lastN int) Collector

func Reversed added in v0.11.0

func Reversed(collector Collector) 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 added in v1.0.0

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 added in v1.0.0

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