Versions in this module Expand all Collapse all v1 v1.2.0 Feb 13, 2023 v1.1.2 Dec 13, 2022 v1.1.1 Dec 13, 2022 v1.1.0 Dec 13, 2022 Changes in this version + const DefaultModelPkg + var DOKeywords = KeyWord + var GenKeywords = KeyWord + var GormKeywords = KeyWord + func GroupByColumn(indexList []gorm.Index) map[string][]*Index + type AddMethodOpt func() (methods []interface{}) + func (AddMethodOpt) OptionType() string + func (o AddMethodOpt) Methods() []interface{} + type Column struct + Indexes []*Index + TableName string + UseScanType bool + func (c *Column) GetDataType() (fieldtype string) + func (c *Column) SetDataTypeMap(m map[string]func(detailType string) (dataType string)) + func (c *Column) ToField(nullable, coverable, signable bool) *Field + func (c *Column) WithNS(jsonTagNS, newTagNS func(columnName string) string) + type Config struct + ImportPkgPaths []string + ModelName string + ModelOpts []Option + ModelPkg string + TableName string + TablePrefix string + func (cfg *Config) GetModelMethods() (methods []interface{}) + func (cfg *Config) GetNames() (tableName, structName, fileName string) + func (cfg *Config) GetSchemaName(db *gorm.DB) string + func (cfg *Config) Preprocess() *Config + type CreateFieldOpt ModifyFieldOpt + func (CreateFieldOpt) OptionType() string + func (o CreateFieldOpt) Operator() func(*Field) *Field + type Field struct + ColumnComment string + ColumnName string + CustomGenType 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) EscapeKeywordFor(keywords KeyWord) *Field + func (m *Field) GenType() string + func (m *Field) IsRelation() bool + func (m *Field) Tags() string + type FieldConfig struct + CreateOpts []FieldOption + DataTypeMap map[string]func(detailType string) (dataType string) + FieldCoverable bool + FieldJSONTagNS func(columnName string) string + FieldNewTagNS func(columnName string) string + FieldNullable bool + FieldSignable bool + FieldWithIndexTag bool + FieldWithTypeTag bool + FilterOpts []FieldOption + ModifyOpts []FieldOption + type FieldOption interface + Operator func() func(*Field) *Field + type FilterFieldOpt ModifyFieldOpt + func (FilterFieldOpt) OptionType() string + func (o FilterFieldOpt) Operator() func(*Field) *Field + type Index struct + Priority int32 + type KeyWord struct + func (g *KeyWord) Contain(text string) bool + func (g *KeyWord) FullMatch(word string) bool + type MethodConfig struct + MethodOpts []MethodOption + type MethodOption interface + Methods func() (methods []interface{}) + type ModifyFieldOpt func(*Field) *Field + func (ModifyFieldOpt) OptionType() string + func (o ModifyFieldOpt) Operator() func(*Field) *Field + type NameStrategy struct + FileNameNS func(tableName string) string + ModelNameNS func(tableName string) string + SchemaNameOpts []SchemaNameOpt + TableNameNS func(tableName string) string + type Option interface + OptionType func() string + type SQLBuffer struct + func (s *SQLBuffer) Dump() string + func (s *SQLBuffer) WriteSQL(b byte) + type SchemaNameOpt func(*gorm.DB) string + type SourceCode int + const Object + 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