package
0.0.36
Repository: https://github.com/hnit-acm/hfunc.git
Documentation: pkg.go.dev

# Functions

No description provided by the author
参数: p: 用于生成的结构体 filter: 字段过滤器tag: name: 表字段名,不设置则默认,蛇形结构体字段名 op: 数据库操作符, =,<,>,<>,<=,>=,like等,默认为 =结果集:map[key]value key为name+op+?,value为结构体字段值example: type Sql struct{ FirstName string `op:"like"` LastName string `op:"="` FromTime time.Time `name:"create_time" op:">"` ToTime time.Time `name:"create_time" op:"<"` } s := session.Session.Table(this.Table()) params := Sql{FirstName:"tom%",LastName:"tomm",FromTime:略,ToTime:time.Now()} paramsMap := db.DefaultStructToMap(params, convertor.IsEmpty) for _, val := range paramsMap { for k, v := range val { s = s.Where(k, v) } } 使用过滤器可以使用不定参数 使用and生成的Sql为,where first_name like ? and last_name = ? and create_time > ? and create_time < ? .

# Variables

DefaultGetFieldsArray 默认方法.
DefaultGetFieldsArray 默认方法.
No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author