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 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 ¶
This section is empty.
Functions ¶
func GetLimitQueryMods ¶
GetLimitQueryMods 获取Limit相关QueryMods
func JsonValueCompare ¶
func NewQmBuilder ¶
Types ¶
type DbImpl ¶ added in v0.0.8
type DbImpl interface {
Exclude(...string) DbImpl // 设置排除字段
AutoIncr(...string) DbImpl // 设置自增字段
JSONArray() DbImpl // 设置Json字段的处理函数为Json数组
Fill(modelObject any, props map[string]any) error // 将props值填入到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.