Documentation
¶
Overview ¶
* @Author: Wangjun * @Date: 2021-06-11 18:00:32 * @LastEditTime: 2022-09-21 15:23:50 * @LastEditors: wangjun haodreams@163.com * @Description:生成code * @FilePath: \rtserviced:\go\src\gitee.com\haodreams\golib\gensql\gensql.go * hnxr
Index ¶
- func GenSQLData(xdb *gorm.DB, array interface{}) (sql string, rows [][]interface{}, err error)
- func GetMapFieldFromStruct(class interface{}) (mp map[string]int)
- func GetStructValues(items interface{}) (values []interface{})
- func GetTitlesFromStruct(class interface{}) (name string, titles []string)
- type Tabler
- type Valuer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenSQLData ¶
func GetMapFieldFromStruct ¶
*
- @description: 成员变量和ID对应, 只查找最顶级的结构体变量
- @param {interface{}} class
- @return {*}
func GetStructValues ¶
func GetStructValues(items interface{}) (values []interface{})
GetStructValues 获取设备字段对应的值
func GetTitlesFromStruct ¶
GetTitlesFromStruct 获取类中的成员变量和变量对应的值
Types ¶
Click to show internal directories.
Click to hide internal directories.