parser

package
v3.25.6 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 License: MIT Imports: 7 Imported by: 0

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

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 ItemRawBlock

func ItemRawBlock(colType uint8, pHeader, pStart unsafe.Pointer, row int, precision int, timeFormat FormatTimeFunc) driver.Value

func RawBlockGetColDataOffset

func RawBlockGetColDataOffset(colCount int) uintptr

func RawBlockGetColInfo

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

func RawBlockGetColumnLengthOffset

func RawBlockGetColumnLengthOffset(colCount int) uintptr

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

ReadBlock in-place

func ReadBlockSimple

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

func ReadBlockWithTimeFormat

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

func ReadRow

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

Types

type FormatTimeFunc

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

type RawBlockColInfo

type RawBlockColInfo struct {
	ColType int8
	Bytes   int32
}

type TMQBlockInfo

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

type TMQRawDataParser

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

func NewTMQRawDataParser

func NewTMQRawDataParser() *TMQRawDataParser

func (*TMQRawDataParser) Parse

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

type TMQRawDataSchema

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