Versions in this module Expand all Collapse all v1 v1.16.2 Sep 23, 2026 Changes in this version + const CodeTypeCrudInfo + const CodeTypeDAO + const CodeTypeDAOHelpers + const CodeTypeDAOUpdate + const CodeTypeHandler + const CodeTypeJSON + const CodeTypeModel + const CodeTypeProto + const CodeTypeService + const CodeTypeTableInfo + const DBDriverMongodb + const DBDriverMysql + const DBDriverPostgresql + const DBDriverSqlite + const DBDriverTidb + const ProtoSubStructKey + const SubStructKey + const TableName + func ConvertToSQLByMgoFields(tableName string, fields []*MgoField) (string, map[string]string) + func ConvertToSQLByPgFields(tableName string, fields PGFields) (string, map[string]string) + func GetMysqlTableInfo(dsn, tableName string) (string, error) + func GetSqliteTableInfo(dbFile string, tableName string) (string, error) + func GetTableInfo(dsn, tableName string) (string, error) + func MgoFieldToGoStruct(name string, fs []*MgoField) string + func ParseSQL(sql string, options ...Option) (map[string]string, error) + func SetJSONTagCamelCase() + func SetJSONTagSnakeCase() + func UnMarshalTableInfo(data string) (map[string]interface{}, error) + type Codes struct + HandlerStruct []string + Model []string + ModelJSON []string + UpdateFields []string + type CrudInfo struct + ColumnName string + ColumnNameCamel string + ColumnNameCamelFCL string + ColumnNamePluralCamel string + ColumnNamePluralCamelFCL string + GoType string + GoTypeFCU string + IsCommonType bool + IsStandardPrimaryKey bool + IsStringType bool + PrimaryKeyColumnName string + ProtoType string + TableNameCamel string + TableNameCamelFCL string + TableNamePluralCamel string + TableNamePluralCamelFCL string + func (info *CrudInfo) CheckCommonType() bool + func (info *CrudInfo) GetGRPCProtoValidation() string + func (info *CrudInfo) GetWebProtoValidation() string + type Field struct + ColumnComment string + ColumnName string + ColumnNameCamel string + ColumnNameCamelFCL string + GoType string + IsPrimaryKey bool + Tag string + type MgoField struct + Comment string + Name string + ObjectStr string + ProtoObjectStr string + Type string + func GetMongodbTableInfo(dsn string, tableName string) ([]*MgoField, error) + type NullStyle int + const NullDisable + const NullInPointer + const NullInSql + type Option func(*options) + func WithCharset(charset string) Option + func WithCollation(collation string) Option + func WithColumnPrefix(p string) Option + func WithCustomTemplate() Option + func WithDBDriver(driver string) Option + func WithEmbed() Option + func WithExtendedAPI() Option + func WithFieldTypes(fieldTypes map[string]string) Option + func WithForceTableName() Option + func WithGormType() Option + func WithJSONTag(namedType int) Option + func WithNoNullType() Option + func WithNullStyle(s NullStyle) Option + func WithPackage(pkg string) Option + func WithSoftDelete(enabled bool) Option + func WithTablePrefix(p string) Option + func WithWebProto() Option + type PGField struct + Comment string + IsPrimaryKey bool + Length int + Lengthvar int + Name string + Notnull bool + Type string + type PGFields []*PGField + func GetPostgresqlTableInfo(dsn string, tableName string) (PGFields, error) + type PrimaryKey struct + GoType string + GoTypeFCU string + IsStringType bool + Name string + NameCamel string + NameCamelFCL string + NamePluralCamel string + NamePluralCamelFCL string + type SqliteField struct + Cid int + DefaultValue string + Name string + Notnull int + Pk int + Type string + type SqliteFields []*SqliteField + type TableInfo struct + ColumnSubMessage string + ColumnSubStructure string + Columns []Field + DBDriver string + PrimaryKey *PrimaryKey + TableComment string + TableName string + TableNameCamel string + TableNameCamelFCL string + TableNamePluralCamel string + TableNamePluralCamelFCL string + TableNamePrefix string + TableNameSnake string