database

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: MulanPSL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitDbMysql

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

func InitDbPostgres

func InitDbPostgres(conn string) (dbinst *gorm.DB, err error)

Types

type FuncGetDb

type FuncGetDb func() *gorm.DB

type IchubDbClient

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

	baseconfig.DbClientDto
}

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) 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=" + base.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