Documentation ¶
Index ¶
- func GetDB() *gorm.DB
- func GetSQL(name string) string
- func InitConnection(dialect string, args ...interface{}) error
- func Query(work func(sql *gorm.DB) error) error
- func Reconnect() error
- func RegisterSQL(name string, sql string)
- func SetConfig(maxIdleConns int, maxOpenConns int, connMaxLifetime time.Duration)
- func Transaction(work func(tx *gorm.DB) error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitConnection ¶
InitConnection initializes db connection.
func RegisterSQL ¶
RegisterSQL registers a sql string in memory.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.