sqlboiler

package module
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsAliasColumn

func AsAliasColumn(alias, colName string) string

func GetDB

func GetDB(args ...boil.Executor) boil.Executor

func GetLimitQueryMods

func GetLimitQueryMods(list *protobuf.ListParam) []qm.QueryMod

GetLimitQueryMods 获取Limit相关QueryMods

func InnerJoin

func InnerJoin(joinTable string, args ...string) *joinClause

func JsonValue

func JsonValue(jsonColumn string, jsonKey string, defaultValue any) qm.QueryMod

func JsonValueCompare

func JsonValueCompare(jsonColumn string, jsonKey string, operator string, compareValue any) qm.QueryMod

func LeftJoin

func LeftJoin(joinTable string, args ...string) *joinClause

func NewQmBuilder

func NewQmBuilder(mods ...qm.QueryMod) *qmBuilder

func OrderBy

func OrderBy() *orderByBuilder

OrderBy OrderBy字段加入desc

func WithUpdateTime

func WithUpdateTime(cols map[string]any, args ...string) map[string]any

WithUpdateTime 除了cols中的会更新以外还会更新更新时间字段

Types

type MysqlImpl added in v0.0.3

type MysqlImpl struct {
}

func Mysql added in v0.0.3

func Mysql() *MysqlImpl

func (*MysqlImpl) IfNull added in v0.0.3

func (*MysqlImpl) IfNull(column string, defaultValue any, args ...string) string

func (*MysqlImpl) IfNullWithColumn added in v0.0.3

func (*MysqlImpl) IfNullWithColumn(column string, anotherColumn string, args ...string) string

func (*MysqlImpl) JsonValue added in v0.0.3

func (*MysqlImpl) JsonValue(jsonColumn string, jsonKey string, defaultValue any) qm.QueryMod

func (*MysqlImpl) JsonValueCompare added in v0.0.3

func (*MysqlImpl) JsonValueCompare(jsonColumn string, jsonKey string, operator string, compareValue any) qm.QueryMod

func (*MysqlImpl) SUM added in v0.0.3

func (impl *MysqlImpl) SUM(col string, args ...string) string

type PsqlImpl added in v0.0.3

type PsqlImpl struct {
}

func Psql added in v0.0.3

func Psql() *PsqlImpl

func (*PsqlImpl) IfNull added in v0.0.3

func (*PsqlImpl) IfNull(column string, defaultValue any, args ...string) string

func (*PsqlImpl) IfNullWithColumn added in v0.0.3

func (*PsqlImpl) IfNullWithColumn(column string, anotherColumn string, args ...string) string

func (*PsqlImpl) JsonValue added in v0.0.3

func (*PsqlImpl) JsonValue(jsonColumn string, jsonKey string, defaultValue any) qm.QueryMod

func (*PsqlImpl) JsonValueCompare added in v0.0.3

func (*PsqlImpl) JsonValueCompare(jsonColumn string, jsonKey string, operator string, compareValue any) qm.QueryMod

func (*PsqlImpl) SUM added in v0.0.3

func (impl *PsqlImpl) SUM(col string, args ...string) string

type Transaction

type Transaction struct {
	Tx boil.Transactor
	// contains filtered or unexported fields
}

func NewTransaction

func NewTransaction(logger intf.LoggerProvider, args ...boil.Transactor) (*Transaction, error)

func (Transaction) CommitOrRollback

func (t Transaction) CommitOrRollback(err error)

type Transactor

type Transactor interface {
	Executor() boil.Executor
	Finalize(err error)
}

func NewTransactor

func NewTransactor(logger intf.LoggerProvider) (Transactor, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL