Documentation ¶
Index ¶
- func AlterTableComments(query *gorm.DB, models ...interface{}) *gorm.DB
- func ConvertToml(dst interface{}, src Dict) error
- func CopyObject(src interface{}) interface{}
- func FillTableComments(query *gorm.DB, models ...interface{}) *gorm.DB
- func GetTableComments(query *gorm.DB, models ...interface{}) map[string]string
- func GetTableName(obj interface{}, name string) string
- func InsertRows(scope *gorm.Scope, rows []Dict, verbose bool) error
- func LoadFileData(db *gorm.DB, fname string, models []interface{}, verbose bool) (*gorm.DB, error)
- type Dict
- type Exportor
- type Interface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AlterTableComments ¶
更新当前数据库中的表注释,对比不一致时修改
func ConvertToml ¶
将Dict转为具体对象,键名与属性名匹配时,使用toml标签或不区分大小写的方式
func CopyObject ¶ added in v0.6.1
func CopyObject(src interface{}) interface{}
复制结构体数据,如果使用json打包解包,整数会变成浮点数
func FillTableComments ¶
补充当前数据库中的表注释,仅当没有时才加上
func GetTableComments ¶
找出Model定义中的注释
func GetTableName ¶ added in v0.5.7
Types ¶
type Exportor ¶
type Exportor struct {
Data map[string][]interface{}
}
func NewExportor ¶
func NewExportor() *Exportor
func (*Exportor) AddQueryResult ¶ added in v0.6.0
Click to show internal directories.
Click to hide internal directories.