Documentation ¶
Index ¶
- Constants
- Variables
- func Delete() *deleteData
- func FormatMapKey(oldKey string) string
- func GetValuesFromMap(m map[string]map[string]interface{}, key string) ([]interface{}, error)
- func GetValuesFromMapRows(ms map[string][]map[string]interface{}, key string) ([]interface{}, error)
- func GetValuesFromRows(rows []map[string]interface{}, 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][]map[string]interface{}, error)
- func SelectKeys2One(ctx context.Context, tx mdb.ExecuteAble, keyValues []interface{}, ...) (map[string]map[string]interface{}, error)
- func SelectRows2Many(ctx context.Context, tx mdb.ExecuteAble, sourceRows []map[string]interface{}, ...) (map[string][]map[string]interface{}, []interface{}, error)
- func SelectRows2One(ctx context.Context, tx mdb.ExecuteAble, sourceRows []map[string]interface{}, ...) (map[string]map[string]interface{}, []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 ConvertOr
- type ConvertRaw
- type ConvertValue
- 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 ¶
func GetValuesFromMapRows(ms map[string][]map[string]interface{}, key string) ([]interface{}, error)
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][]map[string]interface{}, error)
SelectKeys2Many 获取关联map
func SelectKeys2One ¶
func SelectKeys2One(ctx context.Context, tx mdb.ExecuteAble, keyValues []interface{}, targetTableName, targetKey string, targetColumns []string) (map[string]map[string]interface{}, error)
SelectKeys2One 获取关联map
func SelectRows2Many ¶
func SelectRows2Many(ctx context.Context, tx mdb.ExecuteAble, sourceRows []map[string]interface{}, sourceKey, targetTableName, targetKey string, targetColumns []string) (map[string][]map[string]interface{}, []interface{}, error)
SelectRows2Many 获取关联map
Types ¶
type ConvertAdd ¶
type ConvertAdd ConvertKv
ConvertAdd k=k+:k
func (ConvertAdd) AppendToQuery ¶
func (o ConvertAdd) AppendToQuery(buf bytes.Buffer, arg map[string]interface{}) (bytes.Buffer, map[string]interface{}, error)
AppendToQuery 写入sql,填充arg
type ConvertDesc ¶
type ConvertDesc string
ConvertDesc k DESC
func (ConvertDesc) AppendToQuery ¶
func (o ConvertDesc) AppendToQuery(buf bytes.Buffer, arg map[string]interface{}) (bytes.Buffer, map[string]interface{}, error)
AppendToQuery 写入sql,填充arg
type ConvertEqRaw ¶
type ConvertEqRaw ConvertKvStr
ConvertEqRaw k=v
func (ConvertEqRaw) AppendToQuery ¶
func (o ConvertEqRaw) AppendToQuery(buf bytes.Buffer, arg map[string]interface{}) (bytes.Buffer, map[string]interface{}, error)
AppendToQuery 写入sql,填充arg
type ConvertFuncAs ¶
type ConvertFuncAs ConvertFuncColAs
ConvertFuncAs func(col) AS as
func ConvertFuncAsMake ¶
func ConvertFuncAsMake(f, col, as string) ConvertFuncAs
ConvertFuncAsMake 生成
func (ConvertFuncAs) AppendToQuery ¶
func (o ConvertFuncAs) AppendToQuery(buf bytes.Buffer, arg map[string]interface{}) (bytes.Buffer, map[string]interface{}, error)
AppendToQuery 写入sql,填充arg
type ConvertFuncColAs ¶
ConvertFuncColAs 字符串
type ConvertRaw ¶
type ConvertRaw string
ConvertRaw 原样生成
func (ConvertRaw) AppendToQuery ¶
func (o ConvertRaw) AppendToQuery(buf bytes.Buffer, arg map[string]interface{}) (bytes.Buffer, map[string]interface{}, error)
AppendToQuery 写入sql,填充arg
type ConvertValue ¶
type ConvertValue string
ConvertValue k=VALUE(k)
func (ConvertValue) AppendToQuery ¶
func (o ConvertValue) AppendToQuery(buf bytes.Buffer, arg map[string]interface{}) (bytes.Buffer, map[string]interface{}, error)
AppendToQuery 写入sql,填充arg
Click to show internal directories.
Click to hide internal directories.