testdata

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BaseDaoBuilder

func BaseDaoBuilder[T orm.Entity]() *baseDaoBuilder[T]

func InArgs

func InArgs[T any](source ...T) inArgs

func MockBaseDao

func MockBaseDao[T orm.Entity](r *require.Assertions, logicalDelCfg *LogicalDelCfg) (*baseDao[T], sqlmock.Sqlmock)

func Not

func Not() not

func WriteCondition

func WriteCondition[T orm.Entity](c *CondGroup, b *orm.SqlBuilder[T])

Types

type CondGroup

type CondGroup struct {
	// contains filtered or unexported fields
}

func And

func And() *CondGroup

func Or

func Or() *CondGroup

func (*CondGroup) Add

func (cg *CondGroup) Add(other *CondGroup) *CondGroup

func (*CondGroup) Between

func (cg *CondGroup) Between(column string, min, max any, opts ...CondOpt) *CondGroup

func (*CondGroup) Eq

func (cg *CondGroup) Eq(column string, arg any, opts ...CondOpt) *CondGroup

func (*CondGroup) Ge

func (cg *CondGroup) Ge(column string, arg any, opts ...CondOpt) *CondGroup

func (*CondGroup) Gt

func (cg *CondGroup) Gt(column string, arg any, opts ...CondOpt) *CondGroup

func (*CondGroup) In

func (cg *CondGroup) In(column string, args inArgs, opts ...CondOpt) *CondGroup

func (*CondGroup) IsNotNull

func (cg *CondGroup) IsNotNull(column string) *CondGroup

func (*CondGroup) IsNull

func (cg *CondGroup) IsNull(column string) *CondGroup

func (*CondGroup) Le

func (cg *CondGroup) Le(column string, arg any, opts ...CondOpt) *CondGroup

func (*CondGroup) Like

func (cg *CondGroup) Like(column string, arg string, opts ...CondOpt) *CondGroup

func (*CondGroup) LikeLeft

func (cg *CondGroup) LikeLeft(column string, arg string, opts ...CondOpt) *CondGroup

func (*CondGroup) LikeRight

func (cg *CondGroup) LikeRight(column string, arg string, opts ...CondOpt) *CondGroup

func (*CondGroup) Lt

func (cg *CondGroup) Lt(column string, arg any, opts ...CondOpt) *CondGroup

func (*CondGroup) Ne

func (cg *CondGroup) Ne(column string, arg any, opts ...CondOpt) *CondGroup

func (*CondGroup) Not

func (cg *CondGroup) Not() *CondGroup

func (*CondGroup) Plain

func (cg *CondGroup) Plain(sql string, args ...any) *CondGroup

func (*CondGroup) ToStrArgs

func (cg *CondGroup) ToStrArgs(nameMap map[string]string) (string, []any)

type CondOpt

type CondOpt func(*condOpt)

func WithIfPredicate

func WithIfPredicate(predicate func() bool) CondOpt

func WithIfPresent

func WithIfPresent() CondOpt

type Logger

type Logger struct {
}

func (Logger) Debugf

func (d Logger) Debugf(ctx context.Context, msg string, args ...interface{})

func (Logger) Errorf

func (d Logger) Errorf(ctx context.Context, msg string, args ...interface{})

func (Logger) Infof

func (d Logger) Infof(ctx context.Context, msg string, args ...interface{})

func (Logger) Warnf

func (d Logger) Warnf(ctx context.Context, msg string, args ...interface{})

type LogicalDelCfg

type LogicalDelCfg struct {
	Column     string
	IdColumn   string
	QueryValue any
}

type OrderBy

type OrderBy struct {
	// contains filtered or unexported fields
}

func Order

func Order() *OrderBy

func (*OrderBy) Asc

func (o *OrderBy) Asc(column string) *OrderBy

func (*OrderBy) Desc

func (o *OrderBy) Desc(column string) *OrderBy

type Paging

type Paging struct {
	// contains filtered or unexported fields
}

func Page

func Page(offset, pageSize int) *Paging

Jump to

Keyboard shortcuts

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