parser

package
v3.7.8 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2026 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Int8Size    = common.Int8Size
	Int16Size   = common.Int16Size
	Int32Size   = common.Int32Size
	Int64Size   = common.Int64Size
	UInt8Size   = common.UInt8Size
	UInt16Size  = common.UInt16Size
	UInt32Size  = common.UInt32Size
	UInt64Size  = common.UInt64Size
	Float32Size = common.Float32Size
	Float64Size = common.Float64Size
)
View Source
const (
	ColInfoSize            = Int8Size + Int32Size
	RawBlockVersionOffset  = 0
	RawBlockLengthOffset   = RawBlockVersionOffset + Int32Size
	NumOfRowsOffset        = RawBlockLengthOffset + Int32Size
	NumOfColsOffset        = NumOfRowsOffset + Int32Size
	HasColumnSegmentOffset = NumOfColsOffset + Int32Size
	GroupIDOffset          = HasColumnSegmentOffset + Int32Size
	ColInfoOffset          = GroupIDOffset + UInt64Size
)

Variables

This section is empty.

Functions

func BMIsNull

func BMIsNull(c byte, n int) bool

func BitPos

func BitPos(n int) int

func BitmapLen

func BitmapLen(n int) int

func CharOffset

func CharOffset(n int) int

func Copy added in v3.5.6

func Copy(source unsafe.Pointer, data []byte, index int, length int)

func IsVarDataType

func IsVarDataType(colType uint8) bool

func ItemIsNull

func ItemIsNull(pHeader unsafe.Pointer, row int) bool

func RawBlockGetColDataOffset

func RawBlockGetColDataOffset(colCount int) uintptr

func RawBlockGetColInfo

func RawBlockGetColInfo(rawBlock unsafe.Pointer, infos []RawBlockColInfo)

func RawBlockGetColumnLengthOffset

func RawBlockGetColumnLengthOffset(colCount int) uintptr

func RawBlockGetDecimalInfo added in v3.7.0

func RawBlockGetDecimalInfo(rawBlock unsafe.Pointer, colIndex int) (uint8, uint8, uint8)

func RawBlockGetGroupID

func RawBlockGetGroupID(rawBlock unsafe.Pointer) uint64

func RawBlockGetHasColumnSegment

func RawBlockGetHasColumnSegment(rawBlock unsafe.Pointer) int32

func RawBlockGetLength

func RawBlockGetLength(rawBlock unsafe.Pointer) int32

func RawBlockGetNumOfCols

func RawBlockGetNumOfCols(rawBlock unsafe.Pointer) int32

func RawBlockGetNumOfRows

func RawBlockGetNumOfRows(rawBlock unsafe.Pointer) int32

func RawBlockGetVersion

func RawBlockGetVersion(rawBlock unsafe.Pointer) int32

func ReadBlock

func ReadBlock(block unsafe.Pointer, blockSize int, colTypes []uint8, precision int) ([][]driver.Value, error)

ReadBlock in-place

func ReadBlockSimple added in v3.5.2

func ReadBlockSimple(block unsafe.Pointer, precision int) ([][]driver.Value, error)

func ReadBlockSimpleWithTimeFormat added in v3.7.4

func ReadBlockSimpleWithTimeFormat(block unsafe.Pointer, precision int, formatFunc FormatTimeFunc) ([][]driver.Value, error)

func ReadBlockWithTimeFormat

func ReadBlockWithTimeFormat(block unsafe.Pointer, blockSize int, colTypes []uint8, precision int, formatFunc FormatTimeFunc) ([][]driver.Value, error)

func ReadRow

func ReadRow(dest []driver.Value, block unsafe.Pointer, blockSize int, row int, colTypes []uint8, precision int, scales []int64) error

func ReadRowWithTimeFormat added in v3.7.4

func ReadRowWithTimeFormat(dest []driver.Value, block unsafe.Pointer, blockSize int, row int, colTypes []uint8, precision int, scales []int64, formatFunc FormatTimeFunc) error

Types

type FormatTimeFunc

type FormatTimeFunc func(ts int64, precision int) driver.Value

type RawBlockColInfo

type RawBlockColInfo struct {
	ColType int8
	Bytes   int32
}

type TMQBlockInfo added in v3.5.2

type TMQBlockInfo struct {
	RawBlock  unsafe.Pointer
	Precision int
	Schema    []*TMQRawDataSchema
	TableName string
}

type TMQRawDataParser added in v3.5.2

type TMQRawDataParser struct {
	// contains filtered or unexported fields
}

func NewTMQRawDataParser added in v3.5.2

func NewTMQRawDataParser() *TMQRawDataParser

func (*TMQRawDataParser) Parse added in v3.5.2

func (p *TMQRawDataParser) Parse(block unsafe.Pointer) ([]*TMQBlockInfo, error)

type TMQRawDataSchema added in v3.5.2

type TMQRawDataSchema struct {
	ColType uint8
	Flag    int8
	Bytes   int64
	ColID   int
	Name    string
}

Jump to

Keyboard shortcuts

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