comm

package
v0.0.0-...-8d4f09a Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TruncateTable = `truncate table %s;`

	DeleteTable = `delete from %s where 1=1;`

	CreateTableTempl = `` /* 174-byte string literal not displayed */

	InsertTemplate = "INSERT INTO %s (content) VALUES %s;"
)

Variables

View Source
var (
	DB *gorm.DB
)

Functions

func GetDB

func GetDB() *gorm.DB

func GetExcelColsByTableDef

func GetExcelColsByTableDef(infos []model.TableInfo) (excelColNameArr, excelColNameHeader []string)

func GetExcelFirstSheet

func GetExcelFirstSheet(filePath string) (sheetName string, rows [][]string)

func GetExcelTable

func GetExcelTable(filePath, sheetName string) (records []map[string]interface{})

func GetStructFields

func GetStructFields(interf interface{}) (fieldNames []string)

func GormMySQL

func GormMySQL() *gorm.DB

Types

This section is empty.

Jump to

Keyboard shortcuts

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