module

package
v3.2.15 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DataTypeMap = map[string][]string{

	"TINYINT":   {"int64", "query.NullInt64", "inactive"},
	"SMALLINT":  {"int64", "query.NullInt64", "inactive"},
	"MEDIUMINT": {"int64", "query.NullInt64", "inactive"},
	"INT":       {"int64", "query.NullInt64", "inactive"},
	"INTEGER":   {"int64", "query.NullInt64", "inactive"},
	"BIGINT":    {"int64", "query.NullInt64", "inactive"},

	"FLOAT":   {"float64", "query.NullFloat64", "inactive"},
	"DOUBLE":  {"float64", "query.NullFloat64", "inactive"},
	"DECIMAL": {"float64", "query.NullFloat64", "inactive"},

	"DATE":      {"time", "query.NullDate", "inactive"},
	"TIME":      {"time", "query.NullTime", "inactive"},
	"YEAR":      {"time", "query.NullYear", "inactive"},
	"DATETIME":  {"time", "query.NullDateTime", "inactive"},
	"TIMESTAMP": {"time", "query.NullTime", "inactive"},

	"CHAR":       {"string", "query.NullString", "active"},
	"VARCHAR":    {"string", "query.NullString", "active"},
	"TINYBLOB":   {"string", "query.NullString", "inactive"},
	"TINYTEXT":   {"string", "query.NullString", "inactive"},
	"BLOB":       {"string", "query.NullString", "inactive"},
	"TEXT":       {"string", "query.NullString", "inactive"},
	"MEDIUMBLOB": {"string", "query.NullString", "inactive"},
	"MEDIUMTEXT": {"string", "query.NullString", "inactive"},
	"LONGBLOB":   {"string", "query.NullString", "inactive"},
	"LONGTEXT":   {"string", "query.NullString", "inactive"},
	"JSON":       {"string", "query.NullString", "inactive"},
}

DataTypeMap ...

Functions

func CamelStr

func CamelStr(name string) string

CamelStr 下划线转驼峰

func Helper added in v3.1.22

func Helper(name string) string

func Run

func Run(db *query.Query, tableName, outputDir, outputPackage, dao, tplFile string)

Types

type Column added in v3.1.22

type Column struct {
	ColumnName    string `db:"COLUMN_NAME"`
	IsNullable    string `db:"IS_NULLABLE"`
	DataType      string `db:"DATA_TYPE"`
	ColumnKey     string `db:"COLUMN_KEY"`
	ColumnComment string `db:"COLUMN_COMMENT"`
}

type CondiTion added in v3.2.6

type CondiTion struct {
	ItemType string
	ItemName string
}

func ToCondiTion added in v3.2.6

func ToCondiTion(item []string, column []Column) []CondiTion

type Func added in v3.1.22

type Func struct {
	FuncName  string
	CondiTion []CondiTion
	NonUnique int64
}

type Index added in v3.2.6

type Index struct {
	NonUnique  int64  `db:"NON_UNIQUE"`
	SeqInIndex int64  `db:"SEQ_IN_INDEX"`
	IndexName  string `db:"INDEX_NAME"`
	IndexType  string `db:"INDEX_TYPE"`
	ColumnName string `db:"COLUMN_NAME"`
}

Index ...

type Parse added in v3.1.22

type Parse struct {
	Package   string
	Dao       string
	TableName string
	CondiTion []CondiTion
	Func      []Func
}

Jump to

Keyboard shortcuts

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