schema

package
v0.0.0-...-9618194 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: GPL-3.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

View Source
const (
	FieldTypeBit       FieldType = "bit"       //
	FieldTypeTinyint             = "tinyint"   //
	FieldTypeBool                = "bool"      //
	FieldTypeBoolean             = "boolean"   //
	FieldTypeSmallint            = "smallint"  //
	FieldTypeMediumint           = "mediumint" //
	FieldTypeInt                 = "int"       //
	FieldTypeInteger             = "integer"   //
	FieldTypeBigint              = "bigint"    //
	FieldTypeDecimal             = "decimal"   //
	FieldTypeFloat               = "float"     //
	FieldTypeDouble              = "double"    //
	FieldTypeDate                = "date"      // '0000-00-00'
	FieldTypeTime                = "time"      // '00:00:00'
	FieldTypeDatetime            = "datetime"  // '0000-00-00 00:00:00'
	FieldTypeTimestamp           = "timestamp" // '0000-00-00 00:00:00'
	FieldTypeYear                = "year"      // 0000
	FieldTypeChar                = "char"      //
	FieldTypeVarchar             = "varchar"   //
	FieldTypeBinary              = "binary"    //
	FieldTypeVarbinary           = "varbinary" //
	FieldTypeBlob                = "blob"      //
	FieldTypeText                = "text"      //
	FieldTypeEnum                = "enum"      //
	FieldTypeSet                 = "set"       //
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Column

type Column struct {
	Name      string
	FieldType FieldType
	DataType  DataType
}

type ColumnShow

type ColumnShow struct {
	Column

	NameZhLen     int
	NameShowWidth int
	FieldTypeLen  int
}

func NewColumnShow

func NewColumnShow(c Column) ColumnShow

type Columns

type Columns []Column

func NewColumnsFromSimpleDb

func NewColumnsFromSimpleDb(columns []schema.Column) Columns

func (Columns) ToColumnShow

func (c Columns) ToColumnShow() []ColumnShow

type DataType

type DataType byte
const (
	DataTypeUnknown DataType = iota
	DataTypeBool
	DataTypeInt
	DataTypeUint
	DataTypeFloat
	DataTypeString
	DataTypeTime
	DataTypeBytes
)

func FileTypeToDataType

func FileTypeToDataType(ft FieldType) DataType

type FieldType

type FieldType string

type Table

type Table struct {
	Name string
}

type TypeFlag

type TypeFlag string

Jump to

Keyboard shortcuts

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