Versions in this module Expand all Collapse all v0 v0.2.31 Dec 28, 2021 v0.2.30 Dec 23, 2021 v0.2.29 Dec 23, 2021 Changes in this version + var GenKeywords = KeyWords + var GormKeywords = KeyWords + func GroupByColumn(indexList []*Index) map[string][]*Index + type Column struct + ColumnComment string + ColumnDefault string + ColumnKey string + ColumnName string + ColumnType string + DataType string + Extra string + Indexes []*Index + IsNullable string + TableName string + func (c *Column) AutoIncrement() bool + func (c *Column) GetDataType() (fieldtype string) + func (c *Column) IsPrimaryKey() bool + func (c *Column) SetDataTypeMap(m map[string]func(detailType string) (dataType string)) + func (c *Column) ToField(nullable bool) *Field + func (c *Column) WithNS(jsonTagNS, newTagNS func(columnName string) string) + type Conf struct + FileNameNS func(tableName string) string + ModelName string + ModelNameNS func(tableName string) string + ModelPkg string + SchemaNameOpts []SchemaNameOpt + TableName string + TableNameNS func(tableName string) string + TablePrefix string + func (cf *Conf) GetSchemaName(db *gorm.DB) string + func (cf *Conf) SortOpt() (modifyOpts []FieldOpt, filterOpts []FieldOpt, createOpts []FieldOpt) + type CreateFieldOpt ModifyFieldOpt + func (o CreateFieldOpt) Operator() func(*Field) *Field + type Field struct + ColumnComment string + ColumnName string + GORMTag string + JSONTag string + MultilineComment bool + Name string + NewTag string + OverwriteTag string + Relation *field.Relation + Type string + func (m *Field) EscapeKeyword() *Field + func (m *Field) GenType() string + func (m *Field) IsRelation() bool + type FieldConf struct + DataTypeMap map[string]func(detailType string) (dataType string) + FieldJSONTagNS func(columnName string) string + FieldNewTagNS func(columnName string) string + FieldNullable bool + FieldOpts []FieldOpt + FieldWithIndexTag bool + FieldWithTypeTag bool + type FieldOpt interface + Operator func() func(*Field) *Field + type FilterFieldOpt ModifyFieldOpt + func (o FilterFieldOpt) Operator() func(*Field) *Field + type Index struct + ColumnName string + IndexName string + NonUnique int32 + SeqInIndex int32 + TableName string + func (c *Index) IsPrimaryKey() bool + func (c *Index) IsUnique() bool + type KeyWords struct + func (g *KeyWords) Contain(text string) bool + func (g *KeyWords) FullMatch(word string) bool + type ModifyFieldOpt func(*Field) *Field + func (o ModifyFieldOpt) Operator() func(*Field) *Field + type SQLBuffer struct + func (s *SQLBuffer) Dump() string + func (s *SQLBuffer) WriteSql(b byte) + type SchemaNameOpt func(*gorm.DB) string + type SourceCode int + const Struct + const Table + type Status int + const DATA + const ELSE + const END + const FOR + const IF + const SET + const SQL + const UNKNOWN + const VARIABLE + const WHERE