1 Star 0 Fork 0

h79 / goutils

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
wrapper.go 1.34 KB
一键复制 编辑 原始数据 按行查看 历史
huqiuyun 提交于 2023-12-19 19:27 . log
package wrapper
import (
"gitee.com/h79/goutils/dao/option"
"reflect"
)
var FromType = reflect.TypeOf((*IFrom)(nil)).Elem()
type IFrom interface {
Is() bool
SetChild(child bool)
SetAs(as string)
Build(opts ...option.Option) string
}
var BuilderType = reflect.TypeOf((*IBuilder)(nil)).Elem()
type IBuilder interface {
Is() bool
Build(opts ...option.Option) string
}
var LimitType = reflect.TypeOf((*ILimit)(nil)).Elem()
type ILimit interface {
Is() bool
GetLimit() int
GetOffset() int
Build(opts ...option.Option) string
}
var QueryType = reflect.TypeOf((*IQuery)(nil)).Elem()
type IQuery interface {
Is() bool
Query() string
Value() []interface{}
Build(opts ...option.Option) string
}
var SelectType = reflect.TypeOf((*ISelect)(nil)).Elem()
type ISelect interface {
Is() bool
Query() []string
Value() []interface{}
Build(opts ...option.Option) string
}
var CondType = reflect.TypeOf((*ICond)(nil)).Elem()
type ICond interface {
HasValid() error
Decode(cond string)
BuildCond(cond *Condition)
Build(key string, cb func(obj interface{})) error
}
var ModelType = reflect.TypeOf((*IModel)(nil)).Elem()
type IModel interface {
Clone() IModel
Model() interface{}
Set(key string, v interface{})
Get(key string) interface{}
ForEach(cb func(key string, v interface{}))
}
type NewCondFunc func() ICond
type NewModelFunc func() IModel
Go
1
https://gitee.com/h79/goutils.git
git@gitee.com:h79/goutils.git
h79
goutils
goutils
v1.20.65

搜索帮助