Documentation ¶
Index ¶
- Constants
- Variables
- func Delete() *deleteData
- func FormatMapKey(oldKey string) string
- func GetValuesFromMap(m map[string]gin.H, key string) ([]interface{}, error)
- func GetValuesFromMapRows(ms map[string][]gin.H, key string) ([]interface{}, error)
- func GetValuesFromRows(rows []gin.H, key string) ([]interface{}, error)
- func Insert() *insertData
- func InterfaceToStruct(inc interface{}, s interface{}) error
- func Join(joinType int64) *joinData
- func Select() *selectData
- func SelectKeys2Many(ctx context.Context, tx mdb.ExecuteAble, keyValues []interface{}, ...) (map[string][]gin.H, error)
- func SelectKeys2One(ctx context.Context, tx mdb.ExecuteAble, keyValues []interface{}, ...) (map[string]gin.H, error)
- func SelectRows2Many(ctx context.Context, tx mdb.ExecuteAble, sourceRows []gin.H, ...) (map[string][]gin.H, []interface{}, error)
- func SelectRows2One(ctx context.Context, tx mdb.ExecuteAble, sourceRows []gin.H, ...) (map[string]gin.H, []interface{}, error)
- func Update() *updateData
- type ConvertAdd
- type ConvertDesc
- type ConvertEq
- type ConvertEqRaw
- type ConvertFuncAs
- type ConvertFuncColAs
- type ConvertGt
- type ConvertKv
- type ConvertKvStr
- type ConvertLt
- type ConvertMinus
- type ConvertOr
- type ConvertRaw
- type ConvertValues
- type SQLAble
Constants ¶
View Source
const ( JoinTypeInner = 1 JoinTypeLeft = 2 )
join类型
Variables ¶
View Source
var ErrInValueLenZero = errors.New("sql in values len 0")
ErrInValueLenZero in 条件数据长度为0
Functions ¶
func GetValuesFromMap ¶
GetValuesFromMap 获取values
func GetValuesFromMapRows ¶
GetValuesFromMapRows 获取values
func GetValuesFromRows ¶
GetValuesFromRows 获取values
func InterfaceToStruct ¶
func InterfaceToStruct(inc interface{}, s interface{}) error
InterfaceToStruct 转换到struct
func SelectKeys2Many ¶
func SelectKeys2Many(ctx context.Context, tx mdb.ExecuteAble, keyValues []interface{}, targetTableName, targetKey string, targetColumns []string) (map[string][]gin.H, error)
SelectKeys2Many 获取关联map
func SelectKeys2One ¶
func SelectKeys2One(ctx context.Context, tx mdb.ExecuteAble, keyValues []interface{}, targetTableName, targetKey string, targetColumns []string) (map[string]gin.H, error)
SelectKeys2One 获取关联map
func SelectRows2Many ¶
func SelectRows2Many(ctx context.Context, tx mdb.ExecuteAble, sourceRows []gin.H, sourceKey, targetTableName, targetKey string, targetColumns []string) (map[string][]gin.H, []interface{}, error)
SelectRows2Many 获取关联map
Types ¶
type ConvertFuncAs ¶
type ConvertFuncAs ConvertFuncColAs
ConvertFuncAs func(col) AS as
func ConvertFuncAsMake ¶
func ConvertFuncAsMake(f, col, as string) ConvertFuncAs
ConvertFuncAsMake 生成
type ConvertFuncColAs ¶
ConvertFuncColAs 字符串
type ConvertMinus ¶ added in v0.0.21
type ConvertMinus ConvertKv
ConvertMinus k=k-:k
func ConvertMinusMake ¶ added in v0.0.21
func ConvertMinusMake(k string, v interface{}) ConvertMinus
ConvertMinusMake 生成
Click to show internal directories.
Click to hide internal directories.