factrydb

package
v1.0.1-dev-02 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: MulanPSL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FactroyDb

type FactroyDb struct {
	DbClientDto  *baseconfig.DbClientDto
	DB           *gorm.DB `json:"-"`
	Table        string
	TableComment *string

	*metadata.MetaPkInfo
	StringFieldName string `json:"-"`
	StringFieldLen  string `json:"-"`

	iface.IFactroyDb
}

func NewFactroyDb

func NewFactroyDb() *FactroyDb

func (*FactroyDb) CacheKey

func (this *FactroyDb) CacheKey() string

func (*FactroyDb) FindFields

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

func (*FactroyDb) FindMetadata

func (this *FactroyDb) FindMetadata(table string) *metadata.MetadataTable

func (*FactroyDb) FuncGetDb

func (this *FactroyDb) FuncGetDb() *gorm.DB

func (*FactroyDb) GetDbClientDto

func (this *FactroyDb) GetDbClientDto() *baseconfig.DbClientDto

func (*FactroyDb) IfMysql

func (this *FactroyDb) IfMysql() bool

func (*FactroyDb) IsMysql

func (this *FactroyDb) IsMysql() bool

func (*FactroyDb) IsPostgres

func (this *FactroyDb) IsPostgres() bool

func (*FactroyDb) SetDbClientDto

func (this *FactroyDb) SetDbClientDto(dto *baseconfig.DbClientDto)

type FactroyMysql

type FactroyMysql struct {
	*FactroyDb
}

@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() *FactroyMysql

func (*FactroyMysql) BuildModel

func (this *FactroyMysql) BuildModel() *dto.DefineFactors

func (*FactroyMysql) FindColumns

func (this *FactroyMysql) FindColumns() *[]metadata.MetadataColumn

func (*FactroyMysql) FindGoType

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

func (*FactroyMysql) FindPgPkey

func (this *FactroyMysql) FindPgPkey(table string) []metadata.MetaPkInfo

func (*FactroyMysql) FindProtoType

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

func (*FactroyMysql) FindTableComment

func (this *FactroyMysql) FindTableComment()

func (*FactroyMysql) FindTables

func (this *FactroyMysql) FindTables() []metadata.MetadataTable

func (*FactroyMysql) MakeModelProto

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

func (*FactroyMysql) MakeModelProtoBody

func (this *FactroyMysql) MakeModelProtoBody(columns *[]metadata.MetadataColumn) *list.List

type FactroyPostgres

type FactroyPostgres struct {
	*FactroyDb
}

@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() *dto.DefineFactors

func (*FactroyPostgres) FindColumns

func (this *FactroyPostgres) FindColumns() *[]metadata.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) *metadata.MetadataTable

func (*FactroyPostgres) FindPgPkey

func (this *FactroyPostgres) FindPgPkey(table string) []metadata.MetaPkInfo

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() []metadata.MetadataTable

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 *[]metadata.MetadataColumn) *list.List

func (*FactroyPostgres) String

func (this *FactroyPostgres) String() string

func (*FactroyPostgres) ToString

func (this *FactroyPostgres) ToString() string

Jump to

Keyboard shortcuts

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