model

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeBlockKeyPrefix

func DecodeBlockKeyPrefix(buf []byte) (segmentId, blockId uint64)

func DecodeHiddenKey

func DecodeHiddenKey(src []byte) (segmentId, blockId uint64, offset uint32)

func DecodeHiddenKeyFromValue

func DecodeHiddenKeyFromValue(v any) (segmentId, blockId uint64, offset uint32)

func EncodeBlockKeyPrefix

func EncodeBlockKeyPrefix(segmentId, blockId uint64) []byte

[48 Bit (BlockID) + 48 Bit (SegmentID)]

func EncodeCompoundColumn

func EncodeCompoundColumn(cols ...containers.Vector) (cc containers.Vector)

func EncodeHiddenKey

func EncodeHiddenKey(segmentId, blockId uint64, offset uint32) (key any)

func EncodeHiddenKeyWithPrefix

func EncodeHiddenKeyWithPrefix(dest, prefix, offsetBuf []byte, offset uint32)

func EncodeTuple

func EncodeTuple(w *bytes.Buffer, row uint32, cols ...containers.Vector) []byte

func EncodeTypedVals

func EncodeTypedVals(w *bytes.Buffer, vals ...any) []byte

func PrepareHiddenData

func PrepareHiddenData(typ types.Type, prefix []byte, startRow, length uint32) (col containers.Vector, err error)

Types

type BlockView

type BlockView struct {
	Ts               uint64
	Columns          map[int]*ColumnView
	DeleteMask       *roaring.Bitmap
	DeleteLogIndexes []*wal.Index
}

func NewBlockView

func NewBlockView(ts uint64) *BlockView

func (*BlockView) Close

func (view *BlockView) Close()

func (*BlockView) Eval

func (view *BlockView) Eval(clear bool) (err error)

func (*BlockView) GetColumnData

func (view *BlockView) GetColumnData(i int) containers.Vector

func (*BlockView) Orphan

func (view *BlockView) Orphan(i int) containers.Vector

func (*BlockView) SetBatch

func (view *BlockView) SetBatch(bat *containers.Batch)

func (*BlockView) SetData

func (view *BlockView) SetData(i int, data containers.Vector)

func (*BlockView) SetLogIndexes

func (view *BlockView) SetLogIndexes(i int, indexes []*wal.Index)

func (*BlockView) SetUpdates

func (view *BlockView) SetUpdates(i int, mask *roaring.Bitmap, vals map[uint32]any)

type ColumnView

type ColumnView struct {
	ColIdx int
	Ts     uint64

	UpdateMask *roaring.Bitmap
	UpdateVals map[uint32]any
	DeleteMask *roaring.Bitmap
	LogIndexes []*wal.Index
	// contains filtered or unexported fields
}

func NewColumnView

func NewColumnView(ts uint64, colIdx int) *ColumnView

func (*ColumnView) ApplyDeletes

func (view *ColumnView) ApplyDeletes() containers.Vector

func (*ColumnView) Close

func (view *ColumnView) Close()

func (*ColumnView) Eval

func (view *ColumnView) Eval(clear bool) (err error)

func (*ColumnView) GetData

func (view *ColumnView) GetData() containers.Vector

func (*ColumnView) GetValue

func (view *ColumnView) GetValue(row int) any

func (*ColumnView) Length

func (view *ColumnView) Length() int

func (*ColumnView) Orphan

func (view *ColumnView) Orphan() containers.Vector

func (*ColumnView) SetData

func (view *ColumnView) SetData(data containers.Vector)

func (*ColumnView) String

func (view *ColumnView) String() string

type CompoundKeyEncoder

type CompoundKeyEncoder = func(*bytes.Buffer, ...any) []byte

type PreparedCompactedBlockData

type PreparedCompactedBlockData struct {
	Columns *containers.Batch
	SortKey containers.Vector
}

func NewPreparedCompactedBlockData

func NewPreparedCompactedBlockData() *PreparedCompactedBlockData

func (*PreparedCompactedBlockData) Close

func (preparer *PreparedCompactedBlockData) Close()

Jump to

Keyboard shortcuts

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