database

package
v0.0.0-...-e3601d1 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2025 License: MulanPSL-2.0 Imports: 16 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDB

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

func Ini

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

func LoadIchubDbClient

func LoadIchubDbClient() baseiface.ISingleton

Types

type DbClient

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

	*baseconfig.DbClientDto
}

func DbCli

func DbCli() *DbClient

func Default

func Default() *DbClient

func FindBeanDbClient

func FindBeanDbClient() *DbClient

func FindDbClient

func FindDbClient(dto *baseconfig.DbClientDto) *DbClient

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

func (*DbClient) DbDebug

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

func (*DbClient) GetDb

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

func (*DbClient) IfMysql

func (this *DbClient) IfMysql() bool

func (*DbClient) IniDb

func (this *DbClient) IniDb() error

func (*DbClient) InitDbMysql

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

func (*DbClient) InitDbPostgres

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

func (*DbClient) Log

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

func (*DbClient) MakeDbUrl

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

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

func (*DbClient) MakeDbUrlCockRoach

func (this *DbClient) MakeDbUrlCockRoach() string

func (*DbClient) MakeDbUrlMysql

func (this *DbClient) MakeDbUrlMysql() string

func (*DbClient) MakeDbUrlPostgres

func (this *DbClient) MakeDbUrlPostgres() string

func (*DbClient) MakeDbUrlSsl

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

func (*DbClient) ValueOf

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

func (*DbClient) Valueof

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

type FuncGetDb

type FuncGetDb func() *gorm.DB

Jump to

Keyboard shortcuts

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