batch

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BatNotFoundErr      = errors.New("not found error")
	BatAlreadyClosedErr = errors.New("already closed error")
)

Functions

This section is empty.

Types

type Batch

type Batch struct {
	sync.RWMutex
	AttrsMap   map[int]int
	Attrs      []int
	Vecs       []vector.IVector
	ClosedMask *roaring.Bitmap
}

func (*Batch) Close

func (bat *Batch) Close() error

func (*Batch) CloseVector

func (bat *Batch) CloseVector(attr int) error

func (*Batch) GetAttrs

func (bat *Batch) GetAttrs() []int

func (*Batch) GetReaderByAttr

func (bat *Batch) GetReaderByAttr(attr int) (dbi.IVectorReader, error)

func (*Batch) GetVectorByAttr

func (bat *Batch) GetVectorByAttr(attr int) (vector.IVector, error)

func (*Batch) IsReadonly

func (bat *Batch) IsReadonly() bool

func (*Batch) IsVectorClosed

func (bat *Batch) IsVectorClosed(attr int) (bool, error)

func (*Batch) Length

func (bat *Batch) Length() int

type IBatch

type IBatch interface {
	dbi.IBatchReader
	GetVectorByAttr(attrId int) (vector.IVector, error)
}

func NewBatch

func NewBatch(attrs []int, vecs []vector.IVector) (IBatch, error)

Jump to

Keyboard shortcuts

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