Documentation ¶
Index ¶
- type DbConfig
- func (dbConfig *DbConfig) LogInfo() (dburl string)
- func (dbConfig *DbConfig) MakeDbUrl() (dburl string)
- func (dbConfig *DbConfig) MakeDbUrlMysql() (dburl string)
- func (dbConfig *DbConfig) MakeDbUrlPostgres() (dburl string)
- func (dbConfig *DbConfig) MakeDbUrlPostgresSsl() (dburl string)
- func (dbConfig *DbConfig) MakeDbUrlSsl() (dburl string)
- type DbFactroy
- func (dbFactroy *DbFactroy) BuildInfo(gendir string)
- func (dbFactroy *DbFactroy) BuildInfoTest(gendir string)
- func (dbFactroy *DbFactroy) BuildModel() (cs *[]metadata.Columns, ms *list.List, ps *list.List, msdto *list.List)
- func (dbFactroy *DbFactroy) CheckTableExist() bool
- func (dbFactroy *DbFactroy) FindColumns() *[]metadata.Columns
- func (dbFactroy *DbFactroy) FindGoType(fieldType string) (goType string)
- func (dbFactroy *DbFactroy) FindPgPkey(table string) []metadata.PkInfo
- func (dbFactroy *DbFactroy) FindProtoType(fieldType string) (pbType string)
- func (dbFactroy *DbFactroy) FindTableComment()
- func (dbFactroy *DbFactroy) FindTables() []metadata.Tables
- func (dbFactroy *DbFactroy) Ini() (dbinst *gorm.DB)
- func (dbFactroy *DbFactroy) IniDb(conn string) (dbinst *gorm.DB)
- func (dbFactroy *DbFactroy) IniLog() *DbFactroy
- func (dbFactroy *DbFactroy) IsMysql() bool
- func (dbFactroy *DbFactroy) MakeModelProto() *list.List
- func (dbFactroy *DbFactroy) MakeModelProtoBody(columns *[]metadata.Columns) *list.List
- func (dbFactroy *DbFactroy) Println()
- func (dbFactroy *DbFactroy) SendEmail(subj, msg string)
- func (tmp *DbFactroy) String() string
- func (tmp *DbFactroy) ToString() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DbConfig ¶
type DbConfig struct { DbType string DbName string Host string Port int32 User string Password string }
@Title 文件名称: db_config.go @Description 描述: 代码工厂数据库配置信息
@Author 作者: leijianming@163.com 时间(2024-01-31 22:38:21) @Update 作者: leijianming@163.com 时间(2024-01-31 22:38:21)
func (*DbConfig) MakeDbUrl ¶
DbUrl: "host=192.168.13.235 port=26257 user=code password=123456 dbname=" + base.Module.DbName + " sslmode=require",
func (*DbConfig) MakeDbUrlMysql ¶
func (*DbConfig) MakeDbUrlPostgres ¶
func (*DbConfig) MakeDbUrlPostgresSsl ¶
func (*DbConfig) MakeDbUrlSsl ¶
type DbFactroy ¶
type DbFactroy struct { Author string //作者 DbConfig *DbConfig ModuleDefine common.ModuleDefine DbType string DbName string //数据库名 Table string //表名 TableComment *string //ModelNameWithTable bool Pkey string PkeyType string Tables []string //genTables list GenDir string GenDirTest string // tmp member var TestFiles []string `json:"-"` StringFieldName string `json:"-"` StringFieldLen string `json:"-"` AllTables []metadata.Tables `json:"-"` //genTables all for CheckTableExist DirFileCS []metadata.DirFileC `json:"-"` //dir service content DbUrl string I int `json:"-"` }
@Title 文件名称: db_factroy.go @Description 描述: 代码工厂基础数据库工厂
@Author 作者: leijianming@163.com 时间(2024-01-31 22:38:21) @Update 作者: leijianming@163.com 时间(2024-01-31 22:38:21)
func (*DbFactroy) BuildInfoTest ¶
func (*DbFactroy) BuildModel ¶
func (*DbFactroy) CheckTableExist ¶
func (*DbFactroy) FindColumns ¶
func (*DbFactroy) FindGoType ¶
func (*DbFactroy) FindPgPkey ¶
func (*DbFactroy) FindProtoType ¶
func (*DbFactroy) FindTableComment ¶
func (dbFactroy *DbFactroy) FindTableComment()
func (*DbFactroy) FindTables ¶
func (*DbFactroy) IsMysql ¶
func (dbFactroy *DbFactroy) IniJoinQuery(tables string) (query *gofactroy.JoinQuery) { query = &gofactroy.JoinQuery{} query.Ini(dbFactroy, tables) return }
func (*DbFactroy) MakeModelProto ¶
func (*DbFactroy) MakeModelProtoBody ¶
Click to show internal directories.
Click to hide internal directories.