serialization

package
v1.1.0-beta.0...-3047328 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BoolType = iota
	Int64Type
	Uint64Type
	FloatType
	StringType
	BinaryJSONType
	OpaqueType
	TimeType
	DurationType

	InterfaceTypeCodeLen = int64(1)
	JSONTypeCodeLen      = int64(types.JSONTypeCode(1))
	BoolLen              = int64(unsafe.Sizeof(true))
	ByteLen              = int64(unsafe.Sizeof(byte(0)))
	Int8Len              = int64(unsafe.Sizeof(int8(0)))
	Uint8Len             = int64(unsafe.Sizeof(uint8(0)))
	IntLen               = int64(unsafe.Sizeof(int(0)))
	Int32Len             = int64(unsafe.Sizeof(int32(0)))
	Uint32Len            = int64(unsafe.Sizeof(uint32(0)))
	Int64Len             = int64(unsafe.Sizeof(int64(0)))
	Uint64Len            = int64(unsafe.Sizeof(uint64(0)))
	Float32Len           = int64(unsafe.Sizeof(float32(0)))
	Float64Len           = int64(unsafe.Sizeof(float64(0)))
	TimeLen              = int64(unsafe.Sizeof(types.Time{}))
	TimeDurationLen      = int64(unsafe.Sizeof(time.Duration(0)))
	UnsafePointerLen     = int64(unsafe.Sizeof(unsafe.Pointer(nil)))
)

These types are used for serializing or deserializing interface type

Variables

This section is empty.

Functions

func DeserializeBinaryJSON

func DeserializeBinaryJSON(posAndBuf *PosAndBuf) types.BinaryJSON

DeserializeBinaryJSON deserializes BinaryJSON type

func DeserializeBool

func DeserializeBool(posAndBuf *PosAndBuf) bool

DeserializeBool deserializes bool type

func DeserializeByte

func DeserializeByte(posAndBuf *PosAndBuf) byte

DeserializeByte deserializes byte type

func DeserializeBytesBuffer

func DeserializeBytesBuffer(posAndBuf *PosAndBuf) *bytes.Buffer

DeserializeBytesBuffer deserializes bytes.Buffer type

func DeserializeEnum

func DeserializeEnum(posAndBuf *PosAndBuf) types.Enum

DeserializeEnum deserializes Enum type

func DeserializeFloat32

func DeserializeFloat32(posAndBuf *PosAndBuf) float32

DeserializeFloat32 deserializes float32 type

func DeserializeFloat64

func DeserializeFloat64(posAndBuf *PosAndBuf) float64

DeserializeFloat64 deserializes float64 type

func DeserializeInt

func DeserializeInt(posAndBuf *PosAndBuf) int

DeserializeInt deserializes int type

func DeserializeInt32

func DeserializeInt32(posAndBuf *PosAndBuf) int32

DeserializeInt32 deserializes int32 type

func DeserializeInt64

func DeserializeInt64(posAndBuf *PosAndBuf) int64

DeserializeInt64 deserializes int64 type

func DeserializeInt8

func DeserializeInt8(posAndBuf *PosAndBuf) int8

DeserializeInt8 deserializes int8 type

func DeserializeInterface

func DeserializeInterface(posAndBuf *PosAndBuf) any

DeserializeInterface deserializes interface type

func DeserializeJSONTypeCode

func DeserializeJSONTypeCode(posAndBuf *PosAndBuf) types.JSONTypeCode

DeserializeJSONTypeCode deserializes JSONTypeCode type

func DeserializeMyDecimal

func DeserializeMyDecimal(posAndBuf *PosAndBuf) types.MyDecimal

DeserializeMyDecimal deserializes MyDecimal type

func DeserializeOpaque

func DeserializeOpaque(posAndBuf *PosAndBuf) types.Opaque

DeserializeOpaque deserializes Opaque type

func DeserializeSet

func DeserializeSet(posAndBuf *PosAndBuf) types.Set

DeserializeSet deserializes Set type

func DeserializeString

func DeserializeString(posAndBuf *PosAndBuf) string

DeserializeString deserializes String type

func DeserializeTime

func DeserializeTime(posAndBuf *PosAndBuf) types.Time

DeserializeTime deserializes Time type

func DeserializeTimeDuration

func DeserializeTimeDuration(posAndBuf *PosAndBuf) time.Duration

DeserializeTimeDuration deserializes time.Duration type

func DeserializeTypesDuration

func DeserializeTypesDuration(posAndBuf *PosAndBuf) types.Duration

DeserializeTypesDuration deserializes types.Duration type

func DeserializeUint32

func DeserializeUint32(posAndBuf *PosAndBuf) uint32

DeserializeUint32 deserializes uint32 type

func DeserializeUint64

func DeserializeUint64(posAndBuf *PosAndBuf) uint64

DeserializeUint64 deserializes uint64 type

func DeserializeUint8

func DeserializeUint8(posAndBuf *PosAndBuf) uint8

DeserializeUint8 deserializes int8 type

func SerializeBinaryJSON

func SerializeBinaryJSON(value *types.BinaryJSON, buf []byte) []byte

SerializeBinaryJSON serializes BinaryJSON type

func SerializeBool

func SerializeBool(value bool, buf []byte) []byte

SerializeBool serializes bool type

func SerializeByte

func SerializeByte(value byte, buf []byte) []byte

SerializeByte serializes byte type

func SerializeBytesBuffer

func SerializeBytesBuffer(value *bytes.Buffer, buf []byte) []byte

SerializeBytesBuffer serializes bytes.Buffer type

func SerializeEnum

func SerializeEnum(value *types.Enum, buf []byte) []byte

SerializeEnum serializes Enum type

func SerializeFloat32

func SerializeFloat32(value float32, buf []byte) []byte

SerializeFloat32 serializes float32 type

func SerializeFloat64

func SerializeFloat64(value float64, buf []byte) []byte

SerializeFloat64 serializes float64 type

func SerializeGoTimeDuration

func SerializeGoTimeDuration(value time.Duration, buf []byte) []byte

SerializeGoTimeDuration serializes time.Duration type

func SerializeInt

func SerializeInt(value int, buf []byte) []byte

SerializeInt serializes int type

func SerializeInt32

func SerializeInt32(value int32, buf []byte) []byte

SerializeInt32 serializes int32 type

func SerializeInt64

func SerializeInt64(value int64, buf []byte) []byte

SerializeInt64 serializes int64 type

func SerializeInt8

func SerializeInt8(value int8, buf []byte) []byte

SerializeInt8 serializes int8 type

func SerializeInterface

func SerializeInterface(value any, buf []byte) []byte

SerializeInterface serialize interface type

func SerializeJSONTypeCode

func SerializeJSONTypeCode(value types.JSONTypeCode, buf []byte) []byte

SerializeJSONTypeCode serializes JSONTypeCode type

func SerializeMyDecimal

func SerializeMyDecimal(value *types.MyDecimal, buf []byte) []byte

SerializeMyDecimal serializes MyDecimal type

func SerializeOpaque

func SerializeOpaque(value types.Opaque, buf []byte) []byte

SerializeOpaque serializes Opaque type

func SerializeSet

func SerializeSet(value *types.Set, buf []byte) []byte

SerializeSet serializes Set type

func SerializeString

func SerializeString(value string, buf []byte) []byte

SerializeString serializes String type

func SerializeTime

func SerializeTime(value types.Time, buf []byte) []byte

SerializeTime serializes Time type

func SerializeTypesDuration

func SerializeTypesDuration(value types.Duration, buf []byte) []byte

SerializeTypesDuration serializes types.Duration type

func SerializeUint32

func SerializeUint32(value uint32, buf []byte) []byte

SerializeUint32 serializes uint32 type

func SerializeUint64

func SerializeUint64(value uint64, buf []byte) []byte

SerializeUint64 serializes uint64 type

func SerializeUint8

func SerializeUint8(value uint8, buf []byte) []byte

SerializeUint8 serializes uint8 type

Types

type PosAndBuf

type PosAndBuf struct {
	Buf []byte
	Pos int64
}

PosAndBuf is the parameter of all DeserializeXXX functions

func (*PosAndBuf) Reset

func (p *PosAndBuf) Reset(col *chunk.Column, idx int)

Reset resets data in PosAndBuf

Jump to

Keyboard shortcuts

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