common

package
v0.0.0-...-9634a1a Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SQL_FILE_DIR = "/etc/mysql"

Functions

func CreateDatabase

func CreateDatabase(db *gorm.DB, database string) error

func CreateDatabaseIfNotExists

func CreateDatabaseIfNotExists(db *gorm.DB, database string) (bool, error)

func DropDatabase

func DropDatabase(db *gorm.DB, database string) error

func ExecuteIssus

func ExecuteIssus(db *gorm.DB, curVersion string) error

func GetConnectionWithDatabase

func GetConnectionWithDatabase(cfg MySqlConfig) *gorm.DB

func GetConnectionWithoudDatabase

func GetConnectionWithoudDatabase(cfg MySqlConfig) *gorm.DB

func GetDSN

func GetDSN(cfg MySqlConfig, database string, timeout uint32, multiStatements bool) string

func GetGormDB

func GetGormDB(dsn string) *gorm.DB

func InitTables

func InitTables(db *gorm.DB) error

func RollbackIfInitTablesFailed

func RollbackIfInitTablesFailed(db *gorm.DB, database string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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