tuple

package
v0.0.0-...-d224df5 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RefTypeName = map[int32]string{
	0:     "NULL_TYPE",
	257:   "INT8",
	770:   "UINT8",
	259:   "INT16",
	772:   "UINT16",
	261:   "INT24",
	774:   "UINT24",
	263:   "INT32",
	776:   "UINT32",
	265:   "INT64",
	778:   "UINT64",
	1035:  "FLOAT32",
	1036:  "FLOAT64",
	2061:  "TIMESTAMP",
	2062:  "DATE",
	2063:  "TIME",
	2064:  "DATETIME",
	785:   "YEAR",
	18:    "DECIMAL",
	6163:  "TEXT",
	10260: "BLOB",
	6165:  "VARCHAR",
	10262: "VARBINARY",
	6167:  "CHAR",
	10264: "BINARY",
	2073:  "BIT",
	2074:  "ENUM",
	2075:  "SET",
	28:    "TUPLE",
	2077:  "GEOMETRY",
	2078:  "JSON",
	31:    "EXPRESSION",
}
View Source
var RefTypeValue = map[string]int32{
	"NULL_TYPE":  0,
	"INT8":       257,
	"UINT8":      770,
	"INT16":      259,
	"UINT16":     772,
	"INT24":      261,
	"UINT24":     774,
	"INT32":      263,
	"UINT32":     776,
	"INT64":      265,
	"UINT64":     778,
	"FLOAT32":    1035,
	"FLOAT64":    1036,
	"TIMESTAMP":  2061,
	"DATE":       2062,
	"TIME":       2063,
	"DATETIME":   2064,
	"YEAR":       785,
	"DECIMAL":    18,
	"TEXT":       6163,
	"BLOB":       10260,
	"VARCHAR":    6165,
	"VARBINARY":  10262,
	"CHAR":       6167,
	"BINARY":     10264,
	"BIT":        2073,
	"ENUM":       2074,
	"SET":        2075,
	"TUPLE":      28,
	"GEOMETRY":   2077,
	"JSON":       2078,
	"EXPRESSION": 31,
}

Functions

This section is empty.

Types

type FormColumnsWrapper

type FormColumnsWrapper struct {
	IsHidden      bool
	AutoIncrement bool
	NotNull       bool
	ZeroFill      bool
	//AutoIncrementVal  bool
	FieldType         string //4 byte
	FieldTypeIntValue int
	FieldName         string
	FieldLength       int16
	FieldCommentValue string
	FieldDefaultValue interface{}
}

func NewFormColumnWrapper

func NewFormColumnWrapper() *FormColumnsWrapper

func (*FormColumnsWrapper) InitializeFormWrapper

func (formColumnsWrapper *FormColumnsWrapper) InitializeFormWrapper(Ishidden bool, AutoIncrement bool,
	NotNull bool, FieldType string, FieldName string, FieldDefaultValue interface{}, FieldCommentValue interface{}, FieldLength int16)

func (*FormColumnsWrapper) ParseContent

func (formColumnsWrapper *FormColumnsWrapper) ParseContent(content []byte)

func (*FormColumnsWrapper) ToBytes

func (formColumnsWrapper *FormColumnsWrapper) ToBytes() []byte

type IndexInfoWrapper

type IndexInfoWrapper struct {
	IndexName    string
	IndexType    string
	Primary      bool
	Spatial      bool
	Unique       bool
	IndexColumns []*FormColumnsWrapper
}

func NewIndexInfoWrapper

func NewIndexInfoWrapper(content []byte, colNamesMapper map[string]*FormColumnsWrapper) *IndexInfoWrapper

func (*IndexInfoWrapper) ToBytes

func (i *IndexInfoWrapper) ToBytes() []byte

type TableRowTuple

type TableRowTuple interface {
	GetTableName() string

	GetDatabaseName() string

	GetColumnLength() int

	//获取非隐藏列
	GetUnHiddenColumnsLength() int

	GetColumnInfos(index byte) *FormColumnsWrapper

	//获取可变列链表
	GetVarColumns() []*FormColumnsWrapper

	GetColumnDescInfo(colName string) (form *FormColumnsWrapper, pos int)
	//根据列下标,计算出可变列表的下标
	//
	GetVarDescribeInfoIndex(index byte) byte

	//获取主键列
	GetPrimaryColumn() *IndexInfoWrapper

	//获取索引列
	GetSecondaryColumns() []*IndexInfoWrapper
}

type TableTuple

type TableTuple interface {
	GetIndexInfoWrappers(colName string) []*IndexInfoWrapper

	GetAllIndexInfoWrappers() []*IndexInfoWrapper
}

Jump to

Keyboard shortcuts

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