core

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Column

type Column struct {
	Name              string
	TableName         string
	Sort              int
	Default           string
	IsNull            bool
	DataType          string
	MaxLength         int // 字符最大长度
	OctetLength       int // 数据的存储长度
	IsNumber          bool
	IsUnsigned        bool
	NumPrecision      int
	NumScale          int
	DatetimePrecision int
	ColumnType        string
	ColumnKey         string
	Extra             string
	Comment           string
}

type Config

type Config struct {
	Host     string
	Port     int
	User     string
	Password string
	Sche     string
	Database string
}

type Index

type Index struct {
	Name       string
	Unique     int
	ColumnName string
}

type Table

type Table struct {
	Name        string
	Comment     string
	ColumnsMap  map[string]*Column
	Columns     []*Column
	PrimaryKeys []string
}

func NewTable

func NewTable() *Table

func (*Table) AddColumn

func (t *Table) AddColumn(c *Column) *Table

func (*Table) AddColumns

func (t *Table) AddColumns(cc []*Column) *Table

func (*Table) AddComment

func (t *Table) AddComment(comment string) *Table

func (*Table) AddPk

func (t *Table) AddPk(pk string) *Table

Jump to

Keyboard shortcuts

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