wrapper

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEntityPrimaryKey

func GetEntityPrimaryKey[T schema.Tabler](entity *T) string

Types

type AbstractQueryWrapper

type AbstractQueryWrapper interface {
	GetWhere() (string, []any)
	GetOrderBy() string
	GetSelect() string
	GetGroupBy() string
	GetHaving() (string, []any)
	GetOffset() int
	GetLimit() int
}

type AbstractUpdateWrapper

type AbstractUpdateWrapper interface {
	GetWhere() (string, []any)
	GetSet() map[string]any
}

type LambdaQueryWrapper

type LambdaQueryWrapper[T schema.Tabler] struct {
	Entity *T
	// contains filtered or unexported fields
}

func NewLambdaQueryWrapper

func NewLambdaQueryWrapper[T schema.Tabler]() *LambdaQueryWrapper[T]

func (*LambdaQueryWrapper[T]) And

func (this *LambdaQueryWrapper[T]) And(cond bool, fn func(wp *LambdaQueryWrapper[T])) *LambdaQueryWrapper[T]

func (*LambdaQueryWrapper[T]) Between

func (this *LambdaQueryWrapper[T]) Between(cond bool, field any, val1 any, val2 any) *LambdaQueryWrapper[T]

func (*LambdaQueryWrapper[T]) Eq

func (this *LambdaQueryWrapper[T]) Eq(cond bool, field any, val any) *LambdaQueryWrapper[T]

func (*LambdaQueryWrapper[T]) Ge

func (this *LambdaQueryWrapper[T]) Ge(cond bool, field any, val any) *LambdaQueryWrapper[T]

func (*LambdaQueryWrapper[T]) GetGroupBy

func (this *LambdaQueryWrapper[T]) GetGroupBy() string

func (*LambdaQueryWrapper[T]) GetHaving

func (this *LambdaQueryWrapper[T]) GetHaving() (string, []any)

func (LambdaQueryWrapper[T]) GetLimit

func (this LambdaQueryWrapper[T]) GetLimit() int

func (LambdaQueryWrapper[T]) GetOffset

func (this LambdaQueryWrapper[T]) GetOffset() int

func (*LambdaQueryWrapper[T]) GetOrderBy

func (this *LambdaQueryWrapper[T]) GetOrderBy() string

func (*LambdaQueryWrapper[T]) GetSelect

func (this *LambdaQueryWrapper[T]) GetSelect() string

func (*LambdaQueryWrapper[T]) GetWhere

func (this *LambdaQueryWrapper[T]) GetWhere() (string, []any)

func (*LambdaQueryWrapper[T]) GroupBy

func (this *LambdaQueryWrapper[T]) GroupBy(cond bool, field any) *LambdaQueryWrapper[T]

func (*LambdaQueryWrapper[T]) Gt

func (this *LambdaQueryWrapper[T]) Gt(cond bool, field any, val any) *LambdaQueryWrapper[T]

func (*LambdaQueryWrapper[T]) Having

func (this *LambdaQueryWrapper[T]) Having(cond bool, sqlHaving string, vals ...any) *LambdaQueryWrapper[T]

func (*LambdaQueryWrapper[T]) In

func (this *LambdaQueryWrapper[T]) In(cond bool, field any, vals any) *LambdaQueryWrapper[T]

func (*LambdaQueryWrapper[T]) IsNotNull

func (this *LambdaQueryWrapper[T]) IsNotNull(cond bool, field any) *LambdaQueryWrapper[T]

func (*LambdaQueryWrapper[T]) IsNull

func (this *LambdaQueryWrapper[T]) IsNull(cond bool, field any) *LambdaQueryWrapper[T]

func (*LambdaQueryWrapper[T]) Le

func (this *LambdaQueryWrapper[T]) Le(cond bool, field any, val any) *LambdaQueryWrapper[T]

func (*LambdaQueryWrapper[T]) Like

func (this *LambdaQueryWrapper[T]) Like(cond bool, field any, val any) *LambdaQueryWrapper[T]

func (*LambdaQueryWrapper[T]) LikeLeft

func (this *LambdaQueryWrapper[T]) LikeLeft(cond bool, field any, val any) *LambdaQueryWrapper[T]

func (*LambdaQueryWrapper[T]) LikeRight

func (this *LambdaQueryWrapper[T]) LikeRight(cond bool, field any, val any) *LambdaQueryWrapper[T]

func (*LambdaQueryWrapper[T]) Limit

func (this *LambdaQueryWrapper[T]) Limit(limit int) *LambdaQueryWrapper[T]

func (*LambdaQueryWrapper[T]) Lt

func (this *LambdaQueryWrapper[T]) Lt(cond bool, field any, val any) *LambdaQueryWrapper[T]

func (*LambdaQueryWrapper[T]) Ne

func (this *LambdaQueryWrapper[T]) Ne(cond bool, field any, val any) *LambdaQueryWrapper[T]

func (*LambdaQueryWrapper[T]) Offset

func (this *LambdaQueryWrapper[T]) Offset(offset int) *LambdaQueryWrapper[T]

func (*LambdaQueryWrapper[T]) Or

func (this *LambdaQueryWrapper[T]) Or(cond bool, fn func(wp *LambdaQueryWrapper[T])) *LambdaQueryWrapper[T]

func (*LambdaQueryWrapper[T]) OrderByAsc

func (this *LambdaQueryWrapper[T]) OrderByAsc(cond bool, field any) *LambdaQueryWrapper[T]

func (*LambdaQueryWrapper[T]) OrderByDesc

func (this *LambdaQueryWrapper[T]) OrderByDesc(cond bool, field any) *LambdaQueryWrapper[T]

func (*LambdaQueryWrapper[T]) Select

func (this *LambdaQueryWrapper[T]) Select(fields ...any) *LambdaQueryWrapper[T]

type LambdaUpdateWrapper

type LambdaUpdateWrapper[T schema.Tabler] struct {
	Entity *T
	// contains filtered or unexported fields
}

func NewLambdaUpdateWrapper

func NewLambdaUpdateWrapper[T schema.Tabler]() *LambdaUpdateWrapper[T]

func (*LambdaUpdateWrapper[T]) And

func (this *LambdaUpdateWrapper[T]) And(cond bool, fn func(wp *LambdaUpdateWrapper[T])) *LambdaUpdateWrapper[T]

func (*LambdaUpdateWrapper[T]) Between

func (this *LambdaUpdateWrapper[T]) Between(cond bool, field any, val1 any, val2 any) *LambdaUpdateWrapper[T]

func (*LambdaUpdateWrapper[T]) Eq

func (this *LambdaUpdateWrapper[T]) Eq(cond bool, field any, val any) *LambdaUpdateWrapper[T]

func (*LambdaUpdateWrapper[T]) Ge

func (this *LambdaUpdateWrapper[T]) Ge(cond bool, field any, val any) *LambdaUpdateWrapper[T]

func (*LambdaUpdateWrapper[T]) GetSet

func (this *LambdaUpdateWrapper[T]) GetSet() map[string]any

func (*LambdaUpdateWrapper[T]) GetWhere

func (this *LambdaUpdateWrapper[T]) GetWhere() (string, []any)

func (*LambdaUpdateWrapper[T]) Gt

func (this *LambdaUpdateWrapper[T]) Gt(cond bool, field any, val any) *LambdaUpdateWrapper[T]

func (*LambdaUpdateWrapper[T]) In

func (this *LambdaUpdateWrapper[T]) In(cond bool, field any, vals any) *LambdaUpdateWrapper[T]

func (*LambdaUpdateWrapper[T]) IsNotNull

func (this *LambdaUpdateWrapper[T]) IsNotNull(cond bool, field any) *LambdaUpdateWrapper[T]

func (*LambdaUpdateWrapper[T]) IsNull

func (this *LambdaUpdateWrapper[T]) IsNull(cond bool, field any) *LambdaUpdateWrapper[T]

func (*LambdaUpdateWrapper[T]) Le

func (this *LambdaUpdateWrapper[T]) Le(cond bool, field any, val any) *LambdaUpdateWrapper[T]

func (*LambdaUpdateWrapper[T]) Like

func (this *LambdaUpdateWrapper[T]) Like(cond bool, field any, val any) *LambdaUpdateWrapper[T]

func (*LambdaUpdateWrapper[T]) LikeLeft

func (this *LambdaUpdateWrapper[T]) LikeLeft(cond bool, field any, val any) *LambdaUpdateWrapper[T]

func (*LambdaUpdateWrapper[T]) LikeRight

func (this *LambdaUpdateWrapper[T]) LikeRight(cond bool, field any, val any) *LambdaUpdateWrapper[T]

func (*LambdaUpdateWrapper[T]) Lt

func (this *LambdaUpdateWrapper[T]) Lt(cond bool, field any, val any) *LambdaUpdateWrapper[T]

func (*LambdaUpdateWrapper[T]) Ne

func (this *LambdaUpdateWrapper[T]) Ne(cond bool, field any, val any) *LambdaUpdateWrapper[T]

func (*LambdaUpdateWrapper[T]) Or

func (this *LambdaUpdateWrapper[T]) Or(cond bool, fn func(wp *LambdaUpdateWrapper[T])) *LambdaUpdateWrapper[T]

func (*LambdaUpdateWrapper[T]) Set

func (this *LambdaUpdateWrapper[T]) Set(cond bool, field any, val any) *LambdaUpdateWrapper[T]

type QueryWrapper

type QueryWrapper[T schema.Tabler] struct {
	// contains filtered or unexported fields
}

func NewQueryWrapper

func NewQueryWrapper[T schema.Tabler]() *QueryWrapper[T]

func (*QueryWrapper[T]) And

func (this *QueryWrapper[T]) And(cond bool, fn func(wp *QueryWrapper[T])) *QueryWrapper[T]

func (*QueryWrapper[T]) Between

func (this *QueryWrapper[T]) Between(cond bool, column string, val1 any, val2 any) *QueryWrapper[T]

func (*QueryWrapper[T]) Eq

func (this *QueryWrapper[T]) Eq(cond bool, column string, val any) *QueryWrapper[T]

func (*QueryWrapper[T]) Ge

func (this *QueryWrapper[T]) Ge(cond bool, column string, val any) *QueryWrapper[T]

func (*QueryWrapper[T]) GetGroupBy

func (this *QueryWrapper[T]) GetGroupBy() string

func (*QueryWrapper[T]) GetHaving

func (this *QueryWrapper[T]) GetHaving() (string, []any)

func (*QueryWrapper[T]) GetLimit

func (this *QueryWrapper[T]) GetLimit() int

func (*QueryWrapper[T]) GetOffset

func (this *QueryWrapper[T]) GetOffset() int

func (*QueryWrapper[T]) GetOrderBy

func (this *QueryWrapper[T]) GetOrderBy() string

func (*QueryWrapper[T]) GetSelect

func (this *QueryWrapper[T]) GetSelect() string

func (*QueryWrapper[T]) GetWhere

func (this *QueryWrapper[T]) GetWhere() (string, []any)

func (*QueryWrapper[T]) GroupBy

func (this *QueryWrapper[T]) GroupBy(cond bool, column string) *QueryWrapper[T]

func (*QueryWrapper[T]) Gt

func (this *QueryWrapper[T]) Gt(cond bool, column string, val any) *QueryWrapper[T]

func (*QueryWrapper[T]) Having

func (this *QueryWrapper[T]) Having(cond bool, sqlHaving string, vals ...any) *QueryWrapper[T]

func (*QueryWrapper[T]) In

func (this *QueryWrapper[T]) In(cond bool, column string, vals any) *QueryWrapper[T]

func (*QueryWrapper[T]) IsNotNull

func (this *QueryWrapper[T]) IsNotNull(cond bool, column string) *QueryWrapper[T]

func (*QueryWrapper[T]) IsNull

func (this *QueryWrapper[T]) IsNull(cond bool, column string) *QueryWrapper[T]

func (*QueryWrapper[T]) Le

func (this *QueryWrapper[T]) Le(cond bool, column string, val any) *QueryWrapper[T]

func (*QueryWrapper[T]) Like

func (this *QueryWrapper[T]) Like(cond bool, column string, val any) *QueryWrapper[T]

func (*QueryWrapper[T]) LikeLeft

func (this *QueryWrapper[T]) LikeLeft(cond bool, column string, val any) *QueryWrapper[T]

func (*QueryWrapper[T]) LikeRight

func (this *QueryWrapper[T]) LikeRight(cond bool, column string, val any) *QueryWrapper[T]

func (*QueryWrapper[T]) Limit

func (this *QueryWrapper[T]) Limit(limit int) *QueryWrapper[T]

func (*QueryWrapper[T]) Lt

func (this *QueryWrapper[T]) Lt(cond bool, column string, val any) *QueryWrapper[T]

func (*QueryWrapper[T]) Ne

func (this *QueryWrapper[T]) Ne(cond bool, column string, val any) *QueryWrapper[T]

func (*QueryWrapper[T]) Offset

func (this *QueryWrapper[T]) Offset(offset int) *QueryWrapper[T]

func (*QueryWrapper[T]) Or

func (this *QueryWrapper[T]) Or(cond bool, fn func(wp *QueryWrapper[T])) *QueryWrapper[T]

func (*QueryWrapper[T]) OrderByAsc

func (this *QueryWrapper[T]) OrderByAsc(cond bool, column string) *QueryWrapper[T]

func (*QueryWrapper[T]) OrderByDesc

func (this *QueryWrapper[T]) OrderByDesc(cond bool, column string) *QueryWrapper[T]

func (*QueryWrapper[T]) Select

func (this *QueryWrapper[T]) Select(columns ...string) *QueryWrapper[T]

type SqlFilter

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

func (SqlFilter) GetWhere

func (this SqlFilter) GetWhere() (string, []any)

type SqlSelector

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

func (SqlSelector) GetGroupBy

func (this SqlSelector) GetGroupBy() string

func (SqlSelector) GetHaving

func (this SqlSelector) GetHaving() (string, []any)

func (SqlSelector) GetLimit

func (this SqlSelector) GetLimit() int

func (SqlSelector) GetOffset

func (this SqlSelector) GetOffset() int

func (SqlSelector) GetOrderBy

func (this SqlSelector) GetOrderBy() string

func (SqlSelector) GetSelect

func (this SqlSelector) GetSelect() string

type SqlUpdater

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

func (SqlUpdater) GetSet

func (this SqlUpdater) GetSet() map[string]any

type UpdateWrapper

type UpdateWrapper[T schema.Tabler] struct {
	// contains filtered or unexported fields
}

func NewUpdateWrapper

func NewUpdateWrapper[T schema.Tabler]() *UpdateWrapper[T]

func (*UpdateWrapper[T]) And

func (this *UpdateWrapper[T]) And(cond bool, fn func(wp *UpdateWrapper[T])) *UpdateWrapper[T]

func (*UpdateWrapper[T]) Between

func (this *UpdateWrapper[T]) Between(cond bool, column string, val1 any, val2 any) *UpdateWrapper[T]

func (*UpdateWrapper[T]) Eq

func (this *UpdateWrapper[T]) Eq(cond bool, column string, val any) *UpdateWrapper[T]

func (*UpdateWrapper[T]) Ge

func (this *UpdateWrapper[T]) Ge(cond bool, column string, val any) *UpdateWrapper[T]

func (*UpdateWrapper[T]) GetSet

func (this *UpdateWrapper[T]) GetSet() map[string]any

func (*UpdateWrapper[T]) GetWhere

func (this *UpdateWrapper[T]) GetWhere() (string, []any)

func (*UpdateWrapper[T]) Gt

func (this *UpdateWrapper[T]) Gt(cond bool, column string, val any) *UpdateWrapper[T]

func (*UpdateWrapper[T]) In

func (this *UpdateWrapper[T]) In(cond bool, column string, vals any) *UpdateWrapper[T]

func (*UpdateWrapper[T]) IsNotNull

func (this *UpdateWrapper[T]) IsNotNull(cond bool, column string) *UpdateWrapper[T]

func (*UpdateWrapper[T]) IsNull

func (this *UpdateWrapper[T]) IsNull(cond bool, column string) *UpdateWrapper[T]

func (*UpdateWrapper[T]) Le

func (this *UpdateWrapper[T]) Le(cond bool, column string, val any) *UpdateWrapper[T]

func (*UpdateWrapper[T]) Like

func (this *UpdateWrapper[T]) Like(cond bool, column string, val any) *UpdateWrapper[T]

func (*UpdateWrapper[T]) LikeLeft

func (this *UpdateWrapper[T]) LikeLeft(cond bool, column string, val any) *UpdateWrapper[T]

func (*UpdateWrapper[T]) LikeRight

func (this *UpdateWrapper[T]) LikeRight(cond bool, column string, val any) *UpdateWrapper[T]

func (*UpdateWrapper[T]) Lt

func (this *UpdateWrapper[T]) Lt(cond bool, column string, val any) *UpdateWrapper[T]

func (*UpdateWrapper[T]) Ne

func (this *UpdateWrapper[T]) Ne(cond bool, column string, val any) *UpdateWrapper[T]

func (*UpdateWrapper[T]) Or

func (this *UpdateWrapper[T]) Or(cond bool, fn func(wp *UpdateWrapper[T])) *UpdateWrapper[T]

func (*UpdateWrapper[T]) Set

func (this *UpdateWrapper[T]) Set(cond bool, column string, val any) *UpdateWrapper[T]

Jump to

Keyboard shortcuts

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