mysql

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package mysql ******************************************************************************

  • @DESC 连接MySQL数据库操作
  • @AUTH Neo
  • @DATE 2022-03-14
  • @CHANGE LOGS
  • DATE CHANGER DETAIL *****************************************************************************

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MySQLClientLaunch

func MySQLClientLaunch()

MySQLClientLaunch ******************************************************************************

  • @DESC 启动创建MySQL数据库连接,读取配置文件中指定的信息,连接数据库
  • @PARAMS
  • @RETURN
  • @AUTH Neo
  • @DATE 2022-03-14
  • @CHANGE LOGS
  • DATE CHANGER DETAIL *****************************************************************************

func RunSyncDB

func RunSyncDB(afterSyncs []AfterSyncFunc, initData InitDataFunc)

RunSyncDB ******************************************************************************

  • @DESC 根据各Model定义,创建数据库表并初始化数据
  • @PARAMS afterSyncs []AfterSyncFunc 数据库表自动创建后的修补操作
  • initData InitDataFunc 数据初始化函数
  • @RETURN
  • @AUTH Neo
  • @DATE 2022-03-14
  • @CHANGE LOGS
  • DATE CHANGER DETAIL *****************************************************************************

Types

type AfterSyncFunc

type AfterSyncFunc func()

type DBConfig

type DBConfig struct {
	Alias    string
	User     string
	Password string
	Host     string
	Database string
	Charset  string
	Loc      string
	Debug    bool
	Force    bool
	Verbose  bool
	Mock     bool
	MaxIdle  int
	MaxConn  int
}

type InitDataFunc

type InitDataFunc func()

Jump to

Keyboard shortcuts

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