metafactroy

package
v0.0.0-...-36220ec Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2024 License: MulanPSL-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func InjectDefineFactors

func InjectDefineFactors(s *DefineFactors)

func InjectMetaFactroy

func InjectMetaFactroy(s *MetaFactroy)

func LoadDefineFactors

func LoadDefineFactors() baseiface.ISingleton

func LoadMetaFactroy

func LoadMetaFactroy() baseiface.ISingleton

Types

type DefineFactors

type DefineFactors struct {
	basedto.BaseEntity

	Columns *[]*metadb.MetadataColumn
	Models  *list.List
}

func FindBeanDefineFactors

func FindBeanDefineFactors() *DefineFactors

func NewDefineFactors

func NewDefineFactors() *DefineFactors

type FacatroyMysql

type FacatroyMysql struct {
	DbClientDto *baseconfig.DbClientDto

	DB           *gorm.DB `json:"-"`
	Table        string
	TableComment *string

	Pkey            string
	PkeyType        string
	StringFieldName string `json:"-"`
	StringFieldLen  string `json:"-"`
	// contains filtered or unexported fields
}

@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 NewFactroyMysql

func NewFactroyMysql() *FacatroyMysql

func (*FacatroyMysql) BuildModel

func (this *FacatroyMysql) BuildModel() *DefineFactors

func (*FacatroyMysql) FindColumns

func (this *FacatroyMysql) FindColumns() *[]*metadb.MetadataColumn

func (*FacatroyMysql) FindFields

func (this *FacatroyMysql) FindFields(table string, fields string) string

func (*FacatroyMysql) FindGoType

func (this *FacatroyMysql) FindGoType(fieldType string) (goType string)

func (*FacatroyMysql) FindMetadata

func (this *FacatroyMysql) FindMetadata(table string) *metadb.MetadataTable

func (*FacatroyMysql) FindPgPkey

func (this *FacatroyMysql) FindPgPkey(table string) []metadb.MetadataPkinfo

func (*FacatroyMysql) FindProtoType

func (this *FacatroyMysql) FindProtoType(fieldType string) (pbType string)

func (*FacatroyMysql) FindTableComment

func (this *FacatroyMysql) FindTableComment()

func (*FacatroyMysql) FindTables

func (this *FacatroyMysql) FindTables() []metadb.MetadataTable

func (*FacatroyMysql) IniDb

func (this *FacatroyMysql) IniDb(conn string) (dbinst *gorm.DB)

func (*FacatroyMysql) MakeModelProto

func (this *FacatroyMysql) MakeModelProto() *list.List

func (*FacatroyMysql) MakeModelProtoBody

func (this *FacatroyMysql) MakeModelProtoBody(columns *[]metadb.MetadataColumn) *list.List

func (*FacatroyMysql) String

func (this *FacatroyMysql) String() string

func (*FacatroyMysql) ToString

func (this *FacatroyMysql) ToString() string

type FactroyPostgres

type FactroyPostgres struct {
	DbClientDto *baseconfig.DbClientDto

	Table        string
	TableComment *string

	Pkey            string
	PkeyType        string
	StringFieldName string `json:"-"`
	StringFieldLen  string `json:"-"`
	// contains filtered or unexported fields
}

@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 NewFactroyPostgres

func NewFactroyPostgres() *FactroyPostgres

func (*FactroyPostgres) BuildModel

func (this *FactroyPostgres) BuildModel() *DefineFactors

func (*FactroyPostgres) FindColumns

func (this *FactroyPostgres) FindColumns() *[]*metadb.MetadataColumn

func (*FactroyPostgres) FindFields

func (this *FactroyPostgres) FindFields(table string, fields string) string

func (*FactroyPostgres) FindGoType

func (this *FactroyPostgres) FindGoType(fieldType string) (goType string)

func (*FactroyPostgres) FindMetadata

func (this *FactroyPostgres) FindMetadata(table string) *metadb.MetadataTable

func (*FactroyPostgres) FindPgPkey

func (this *FactroyPostgres) FindPgPkey(table string) []metadb.MetadataPkinfo

func (*FactroyPostgres) FindProtoType

func (this *FactroyPostgres) FindProtoType(fieldType string) (pbType string)

func (*FactroyPostgres) FindTableComment

func (this *FactroyPostgres) FindTableComment()

func (*FactroyPostgres) FindTables

func (this *FactroyPostgres) FindTables() []metadb.MetadataTable

func (*FactroyPostgres) IniDb

func (this *FactroyPostgres) IniDb(conn string) (dbinst *gorm.DB)

func (*FactroyPostgres) IsMysql

func (this *FactroyPostgres) IsMysql() bool

func (*FactroyPostgres) MakeModelProto

func (this *FactroyPostgres) MakeModelProto() *list.List

func (*FactroyPostgres) MakeModelProtoBody

func (this *FactroyPostgres) MakeModelProtoBody(columns *[]metadb.MetadataColumn) *list.List

func (*FactroyPostgres) String

func (this *FactroyPostgres) String() string

func (*FactroyPostgres) ToString

func (this *FactroyPostgres) ToString() string

type MetaFactroy

type MetaFactroy struct {
	basedto.BaseEntitySingle
	metafile.MetaFile
	DbClientDto *baseconfig.DbClientDto

	Table        string
	TableComment *string

	Pkey       string
	PkeyType   string
	StrPkey    string `json:"-"`
	StrPkeyLen string `json:"-"`
	// contains filtered or unexported fields
}

func FindBeanMetaFactroy

func FindBeanMetaFactroy() *MetaFactroy

func NewMetaFactroy

func NewMetaFactroy() *MetaFactroy

@Title 函数名称: NewMetaFactroy @Description 描述: 创建数据库工厂 @Author 作者: leijianming@163.com 时间(2024-01-31 22:38:21) @Update 作者: leijianming@163.com 时间(2024-01-31 22:38:21) @Return 返回值: *MetaFactroy

func (*MetaFactroy) AlterColumnComment

func (this *MetaFactroy) AlterColumnComment(metatable *metadb.MetadataTable, column *metadb.MetadataColumn) error

func (*MetaFactroy) AlterMetaTable

func (this *MetaFactroy) AlterMetaTable(md *metadb.MetadataTable) error

func (*MetaFactroy) AlterTableComment

func (this *MetaFactroy) AlterTableComment(table string, comment string) error

func (*MetaFactroy) FindFields

func (this *MetaFactroy) FindFields(table string, fieldsName string) *metadb.MetadataTable

func (*MetaFactroy) FindGoType

func (this *MetaFactroy) FindGoType(fieldType string) (goType string)

func (*MetaFactroy) FindMetadata

func (this *MetaFactroy) FindMetadata(table string) *metadb.MetadataTable

func (*MetaFactroy) FindPgPkey

func (this *MetaFactroy) FindPgPkey(table string) []metadb.MetadataPkinfo

func (*MetaFactroy) FindProtoType

func (this *MetaFactroy) FindProtoType(fieldType string) (pbType string)

func (*MetaFactroy) FindTableComment

func (this *MetaFactroy) FindTableComment()

func (*MetaFactroy) FindTables

func (this *MetaFactroy) FindTables() []metadb.MetadataTable

func (*MetaFactroy) IniDb

func (this *MetaFactroy) IniDb() *MetaFactroy

func (*MetaFactroy) IsMysql

func (this *MetaFactroy) IsMysql() bool

type MetaFactroyIface

type MetaFactroyIface interface {
	FindMetadata(table string) *metadb.MetadataTable
	FindFields(table string, fields string) string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL