database

package
v1.4.133 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: MulanPSL-2.0 Imports: 15 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDB added in v1.4.102

func GetDB() (*gorm.DB, error)

func Ini added in v1.4.102

func Ini() (*gorm.DB, error)

func LoadIchubDbClient added in v1.0.61

func LoadIchubDbClient() baseiface.ISingleton

Types

type FuncGetDb

type FuncGetDb func() *gorm.DB

type IchubDbClient

type IchubDbClient struct {
	basedto.BaseEntity
	Db *gorm.DB `json:"-"`

	*baseconfig.DbClientDto
}

func DbCli added in v1.4.102

func DbCli() *IchubDbClient

func Default added in v1.4.102

func Default() *IchubDbClient

func FindBeanIchubDbClient added in v1.0.61

func FindBeanIchubDbClient() *IchubDbClient

func FindDbClient added in v1.4.102

func FindDbClient(dto *baseconfig.DbClientDto) *IchubDbClient

@Title 文件名称: ichubclient.go @Description 描述: 代码工厂数据库配置信息 @Author 作者: leijianming@163.com 时间(2024-03-13 22:38:21) @Update 作者: leijianming@163.com 时间(2024-03-13 22:38:21)

func NewIchubDbClient

func NewIchubDbClient() *IchubDbClient

func (*IchubDbClient) DbDebug

func (this *IchubDbClient) DbDebug() *gorm.DB

func (*IchubDbClient) GetDb

func (this *IchubDbClient) GetDb() *gorm.DB

func (*IchubDbClient) IniDb

func (this *IchubDbClient) IniDb() error

func (*IchubDbClient) InitDbMysql

func (this *IchubDbClient) InitDbMysql(conn string) (*gorm.DB, error)

func (*IchubDbClient) InitDbPostgres

func (this *IchubDbClient) InitDbPostgres(conn string) (db *gorm.DB, err error)

func (*IchubDbClient) Log

func (this *IchubDbClient) Log() (dburl string)

func (*IchubDbClient) MakeDbUrl

func (this *IchubDbClient) MakeDbUrl() (dburl string)

DbUrl:"host=192.168.13.235 port=26257 user=code password=123456 dbname=" + configdto.ModuleDefineInst.Dbname + " sslmode=require",

func (*IchubDbClient) MakeDbUrlCockRoach

func (this *IchubDbClient) MakeDbUrlCockRoach() string

func (*IchubDbClient) MakeDbUrlMysql

func (this *IchubDbClient) MakeDbUrlMysql() string

func (*IchubDbClient) MakeDbUrlPostgres

func (this *IchubDbClient) MakeDbUrlPostgres() string

func (*IchubDbClient) MakeDbUrlSsl

func (this *IchubDbClient) MakeDbUrlSsl() (dburl string)

func (*IchubDbClient) ValueOf

func (this *IchubDbClient) ValueOf(dto *baseconfig.DbClientDto)

func (*IchubDbClient) Valueof

func (this *IchubDbClient) Valueof(ds *baseconfig.DbClientDto)

Jump to

Keyboard shortcuts

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