Documentation
¶
Index ¶
- Variables
- 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 NewQmBuilder(mods ...qm.QueryMod) *qmBuilder
- func WithUpdateTime(cols map[string]any, args ...string) map[string]any
- type DbImpl
- type JoinClauseBuilder
- type OrderByHelper
- type SQLHelper
- type Transactor
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // CreateExcludes 创建操作默认忽略的字段 CreateExcludes = []string{"id", "sn", "version", "created", "updated", "createdat", "updatedat", "r", "l"} // EditExcludes 编辑操作默认忽略的字段 EditExcludes = []string{"id", "sn", "created", "updated", "createdat", "updatedat", "r", "l"} )
预定义常用类型反射对象避免重复创建
Functions ¶
func GetLimitQueryMods ¶
GetLimitQueryMods 获取Limit相关QueryMods
func JsonValueCompare ¶
func NewQmBuilder ¶
Types ¶
type DbImpl ¶ added in v0.0.8
type DbImpl interface {
Exclude(fieldNames ...string) DbImpl // 设置排除字段
AutoIncr(fieldNames ...string) DbImpl // 设置自增字段
JSONArray(fieldNames ...string) DbImpl // 设置为Json数组的字段
JSONObject(fieldNames ...string) DbImpl // 设置Json字段的处理函数为Json数组
Copy(destObject any, source any) error // 将source值填入到modelObject中
Executor() boil.Executor
Tid() int64
}
func Gdb ¶ added in v0.0.8
func Gdb(tx ...Transactor) DbImpl
func Tdb ¶ added in v0.0.8
func Tdb(tid int64, tx ...Transactor) DbImpl
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 SQLHelper ¶ added in v0.0.4
type SQLHelper interface {
IfNull(column string, defaultValue any, args ...string) string
IfNullWithColumn(column string, anotherColumn string, 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
AsAliasColumn(alias, colName string) string
InnerJoin(joinTable string, args ...string) *JoinClauseBuilder
LeftJoin(joinTable string, args ...string) *JoinClauseBuilder
OrderBy() *OrderByHelper
Quote(s string) string
SelectAll(tableName string) qm.QueryMod
}
type Transactor ¶
func NewTransactor ¶
func NewTransactor(logger intf.LoggerProvider) (Transactor, error)
Click to show internal directories.
Click to hide internal directories.