index

package
v2.0.0-alpha.4-fix Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Index

type Index interface {
	Add(docId string, v interface{}, ttl time.Duration) error
	Remove(docId string, v interface{}) error
	Iterate(reverse bool, onValue func(docId string) error) error
	Drop() error
	Type() Type
	Collection() string
	Field() string
}

func CreateIndex

func CreateIndex(collection, field string, idxType Type, tx store.Tx) Index

type Info

type Info struct {
	Field string
	Type  Type
}

type Query

type Query interface {
	Run(onValue func(docId string) error) error
}

type Range

type Range struct {
	Start, End                 interface{}
	StartIncluded, EndIncluded bool
}

func (*Range) Intersect

func (r *Range) Intersect(r2 *Range) *Range

func (*Range) IsEmpty

func (r *Range) IsEmpty() bool

func (*Range) IsNil

func (r *Range) IsNil() bool

type RangeIndex

type RangeIndex interface {
	Index
	IterateRange(vRange *Range, reverse bool, onValue func(docId string) error) error
}

type RangeIndexQuery

type RangeIndexQuery struct {
	Range   *Range
	Reverse bool
	Idx     RangeIndex
}

func (*RangeIndexQuery) Run

func (q *RangeIndexQuery) Run(onValue func(docId string) error) error

type Type

type Type int
const (
	SingleField Type = iota
)

Jump to

Keyboard shortcuts

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