Documentation
¶
Index ¶
- Constants
- Variables
- func GetDB() *gorm.DB
- func GetExcelColsByTableDef(infos []model.TableInfo) (excelColNameArr, excelColNameHeader []string)
- func GetExcelFirstSheet(filePath string) (sheetName string, rows [][]string)
- func GetExcelTable(filePath, sheetName string) (records []map[string]interface{})
- func GetStructFields(interf interface{}) (fieldNames []string)
- func GormMySQL() *gorm.DB
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 GetExcelColsByTableDef ¶
func GetExcelFirstSheet ¶
func GetExcelTable ¶
func GetStructFields ¶
func GetStructFields(interf interface{}) (fieldNames []string)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.