dbi

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: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppendCtx

type AppendCtx struct {
	ShardId   uint64
	OpIndex   uint64
	OpOffset  int
	OpSize    int
	DBName    string
	TableName string
	Data      *batch.Batch
}

type DropTableCtx

type DropTableCtx struct {
	ShardId    uint64
	OpIndex    uint64
	OpOffset   int
	OpSize     int
	DBName     string
	TableName  string
	OnFinishCB OnTableDroppedCB
}

type GetSegmentsCtx

type GetSegmentsCtx struct {
	ShardId   uint64
	OpIndex   uint64
	TableName string
}

type GetSnapshotCtx

type GetSnapshotCtx struct {
	ShardId    uint64
	OpIndex    uint64
	TableName  string
	DBName     string
	SegmentIds []uint64
	ScanAll    bool
	Cols       []int
}

type IBatchReader

type IBatchReader interface {
	IsReadonly() bool
	Length() int
	GetAttrs() []int
	Close() error
	CloseVector(idx int) error
	IsVectorClosed(idx int) (bool, error)
	GetReaderByAttr(attr int) (IVectorReader, error)
}

type IBlock

type IBlock interface {
	GetID() uint64
	GetSegmentID() uint64
	GetTableID() uint64
	Prefetch() IBatchReader
}

type IBlockIt

type IBlockIt interface {
	Iterator
	GetHandle() IBlock
}

type IDS

type IDS struct {
	Version uint64
	Ids     []uint64
}

type ISegment

type ISegment interface {
	NewIt() IBlockIt
	GetID() uint64
	GetTableID() uint64
	BlockIds() []uint64
	GetBlock(id uint64) IBlock
}

type ISegmentIt

type ISegmentIt interface {
	Iterator
	GetHandle() ISegment
}

type ISnapshot

type ISnapshot interface {
	io.Closer
	SegmentIds() []uint64
	NewIt() ISegmentIt
	GetSegment(id uint64) ISegment
}

type IVectorReader

type IVectorReader interface {
	io.Closer
	GetType() VectorType
	GetValue(int) (interface{}, error)
	IsNull(int) (bool, error)
	HasNull() bool
	NullCnt() int
	Length() int
	Capacity() int
	GetMemorySize() uint64
	SliceReference(start, end int) (IVectorReader, error)
	CopyToVector() (*ro.Vector, error)
	CopyToVectorWithBuffer(*bytes.Buffer, *bytes.Buffer) (*ro.Vector, error)
}

type Iterator

type Iterator interface {
	io.Closer
	Next()
	Valid() bool
}

type MatchType

type MatchType uint8
const (
	MTPrefix MatchType = iota
	MTFull
	MTRegex
)

type OnTableDroppedCB

type OnTableDroppedCB = func(error)

type StringMatcher

type StringMatcher struct {
	Type    MatchType
	Pattern string
}

type TableOpCtx

type TableOpCtx struct {
	ShardId   uint64
	OpIndex   uint64
	OpOffset  int
	OpSize    int
	TableName string
}

type VectorType

type VectorType uint8
const (
	StdVec VectorType = iota
	StrVec
	Wrapper
)

Jump to

Keyboard shortcuts

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