qdb

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ConfigPath = "./config/config.toml"
	Settings   map[string]Setting
)

Functions

func Marshal

func Marshal[T any](apiTypesStruct any) T

func NewDb

func NewDb(cfgSection string) *gorm.DB

NewDb

@Description: 创建数据库
@param cfgSection 配置节点,用于启动多个数据库不用配置
@return *gorm.DB

func UnMarshal

func UnMarshal[T any](dbModel any) T

Types

type Setting added in v0.0.4

type Setting struct {
	OpenLog            byte `comment:"开关 0否 1是"`
	SkipDefTransaction byte
	DBConfig           string `` /* 225-byte string literal not displayed */
}

Jump to

Keyboard shortcuts

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