Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DbType_ = e.NewEnum(_DbType{
MYSQL: dbType{driverName: "mysql"},
ORACLE: dbType{driverName: "oracle"},
POSTGRES: dbType{driverName: "postgres"},
SQLSERVER: dbType{driverName: "mssql"},
SQLITE: dbType{driverName: "sqlite"},
})
Functions ¶
This section is empty.
Types ¶
type GenCfg ¶
type GenCfg struct {
// 数据库类型,必填
DbType dbType
// 数据库连接URL,空字符串时不会生成实体,必填
Dsn string
// 相对生成器运行目录的go.mod文件路径,必填
GoModPath string
// 生成文件路径配置
PathCfg PathCfg
// 名称映射配置
NameMapperCfg NameMapperCfg
// 表配置
TableCfg TableCfg
// 逻辑删除配置
LogicalDelCfg LogicalDelCfg
}
GenCfg 生成配置
type LogicalDelCfg ¶
type NameMapperCfg ¶
type NameMapperCfg struct {
// 表名->实体 名称映射,默认转大驼峰
Entity *orm.NameMapper
// 表名->DAO 名称映射,默认转大驼峰
Dao *orm.NameMapper
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.