1 Star 0 Fork 0

玟兵 / go-util

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
mysql_row.go 435 Bytes
一键复制 编辑 原始数据 按行查看 历史
玟兵 提交于 2024-04-25 17:46 . 添加查询数据表字段的方法
package util
// MysqlRow 数据单元
type MysqlRow map[string]any
// ToStr 查询结果转字符串
func (row *MysqlRow) ToStr(key string) string {
return InterfaceToStr((*row)[key])
}
// ToInt64 查询结果转整形
func (row *MysqlRow) ToInt64(key string) int64 {
return InterfaceToInt64((*row)[key])
}
// ToNum 查询结果转数字
func (row *MysqlRow) ToNum(key string) float64 {
return InterfaceToFloat64((*row)[key])
}
Go
1
https://gitee.com/binny_w/go-util.git
git@gitee.com:binny_w/go-util.git
binny_w
go-util
go-util
master

搜索帮助