Documentation
¶
Index ¶
- func GetDB(args ...boil.Executor) boil.Executor
- func GetLimitQueryMods(list *protobuf.ListParam) []qm.QueryMod
- func JsonValue(jsonColumn string, jsonKey string, defaultValue any) qm.QueryMod
- func JsonValueCompare(jsonColumn string, jsonKey string, operator string, compareValue any) qm.QueryMod
- func WithUpdateTime(cols map[string]any, args ...string) map[string]any
- type Db
- type DbCopier
- type Gdb
- type JoinClauseBuilder
- type OrderByHelper
- type QmBuilder
- type SQLHelper
- type Tdb
- type Transactor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLimitQueryMods ¶
GetLimitQueryMods 获取Limit相关QueryMods
func JsonValueCompare ¶
Types ¶
type DbCopier ¶ added in v0.1.0
type DbCopier interface {
Blacklist(fieldNames ...string) DbCopier // 设置黑名单字段
Whitelist(fieldNames ...string) DbCopier // 设置白名单字段
AutoIncr(fieldNames ...string) DbCopier // 设置自增字段
JSONArray(fieldNames ...string) DbCopier // 设置为Json数组的字段
JSONObject(fieldNames ...string) DbCopier // 设置Json字段的处理函数为Json数组
Copy(destObject any, source any) error // 将source值填入到modelObject中
CopyForCreate(destObject any, source any, allowFields ...string) error // 创建动作需要的复制
CopyForEdit(destObject any, source any, allowFields ...string) error // 创建动作需要的复制
}
type JoinClauseBuilder ¶ added in v0.0.4
type JoinClauseBuilder struct {
// contains filtered or unexported fields
}
func (*JoinClauseBuilder) And ¶ added in v0.0.4
func (j *JoinClauseBuilder) And(clause string) *JoinClauseBuilder
func (*JoinClauseBuilder) On ¶ added in v0.0.4
func (j *JoinClauseBuilder) On(columnOrTableColumn, thatTableColumn string) *JoinClauseBuilder
type OrderByHelper ¶ added in v0.0.4
type OrderByHelper struct {
// contains filtered or unexported fields
}
func (*OrderByHelper) Asc ¶ added in v0.0.4
func (o *OrderByHelper) Asc(col string) *OrderByHelper
func (*OrderByHelper) Desc ¶ added in v0.0.4
func (o *OrderByHelper) Desc(col string) *OrderByHelper
type QmBuilder ¶ added in v0.0.16
type QmBuilder interface {
Append(mods ...qm.QueryMod) QmBuilder
Concat(modSlices []qm.QueryMod) QmBuilder
Limit(list ...*protobuf.ListParam) QmBuilder
Output() []qm.QueryMod
}
func NewQmBuilder ¶
type SQLHelper ¶ added in v0.0.4
type SQLHelper interface {
IfNull(column string, defaultValue any, args ...string) string
JsonValue(jsonColumn string, jsonKey string, defaultValue any) qm.QueryMod
JsonValueCompare(jsonColumn string, jsonKey string, operator string, compareValue any) qm.QueryMod
SUM(col string, args ...string) string
InnerJoin(joinTable string, args ...string) *JoinClauseBuilder
LeftJoin(joinTable string, args ...string) *JoinClauseBuilder
OrderBy() *OrderByHelper
Quote(s string, splitWord ...bool) string // 默认quote整个字符串,true否则将分割字符串中的单词,每个单词进行quote
SelectAll(tableColumns any) qm.QueryMod
}
type Transactor ¶
type Transactor interface {
Finalize(err error)
}
func NewTransactor ¶
func NewTransactor(ctx biz.Context, logger types.LoggerProvider) (Transactor, error)
Click to show internal directories.
Click to hide internal directories.