clause

package
v0.0.0-...-b185596 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrAssertBuilder assert builder fail
	ErrAssertBuilder = errors.New("assert builder fail")
)

Functions

func SetDmlExpressions

func SetDmlExpressions(es map[string]Expr)

Types

type AggBuilder

type AggBuilder interface {
	WriteQuotedAgg(field string)
	AddAggVar(key string, value interface{})
}

AggBuilder AggBuilder

type Avg

type Avg struct {
	Alias string
	Value interface{}
}

Avg Avg

func (*Avg) GetTag

func (avg *Avg) GetTag() string

GetTag GetTag

func (*Avg) Set

func (avg *Avg) Set(alias string, values ...interface{})

Set

type Bool

type Bool struct {
	Column string
	Vars   []interface{}
}

func (*Bool) GetTag

func (b *Bool) GetTag() string

func (*Bool) Set

func (b *Bool) Set(column string, values ...interface{})

type Builder

type Builder interface {
	QueryBuilder
	AggBuilder
}

Builder Builder

type Count

type Count struct {
	Alias string
	Value interface{}
}

Count Max

func (*Count) GetTag

func (count *Count) GetTag() string

GetTag GetTag

func (*Count) Set

func (count *Count) Set(alias string, values ...interface{})

Set

type Expr

type Expr func() Expression

type Expression

type Expression interface {
	GetTag() string
	Set(column string, values ...interface{})

	Build(builder Builder)
}

func GetDmlExpression

func GetDmlExpression(op string, column string, values ...interface{}) (Expression, error)

GetDmlExpression get dml expression with op

type FindOptions

type FindOptions struct {
	Page int64
	Size int64
	Sort []string
}

FindOptions page options

type GT

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

GT greater than

func (*GT) CSet

func (c *GT) CSet(column string, values interface{})

CSet set value

func (*GT) GetTag

func (gt *GT) GetTag() string

GetTag get tag

func (*GT) Set

func (gt *GT) Set(column string, values ...interface{})

Set set value

type GTE

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

GTE greater than or equal

func (*GTE) CSet

func (c *GTE) CSet(column string, values interface{})

CSet set value

func (*GTE) GetTag

func (gte *GTE) GetTag() string

GetTag get tag

func (*GTE) Set

func (gte *GTE) Set(column string, values ...interface{})

Set set value

type LT

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

LT less than

func (*LT) CSet

func (c *LT) CSet(column string, values interface{})

CSet set value

func (*LT) GetTag

func (lt *LT) GetTag() string

GetTag get tag

func (*LT) Set

func (lt *LT) Set(column string, values ...interface{})

Set set value

type LTE

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

LTE less than or equal

func (*LTE) CSet

func (c *LTE) CSet(column string, values interface{})

CSet set value

func (*LTE) GetTag

func (lte *LTE) GetTag() string

GetTag get tag

func (*LTE) Set

func (lte *LTE) Set(column string, values ...interface{})

Set set value

type MUST

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

func (*MUST) GetTag

func (m *MUST) GetTag() string

GetTag get tag

func (*MUST) LSet

func (l *MUST) LSet(values ...interface{})

LSet set value

func (*MUST) Set

func (m *MUST) Set(column string, values ...interface{})

Set set value

type MUSTNOT

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

func (*MUSTNOT) GetTag

func (m *MUSTNOT) GetTag() string

GetTag get tag

func (*MUSTNOT) LSet

func (l *MUSTNOT) LSet(values ...interface{})

LSet set value

func (*MUSTNOT) Set

func (m *MUSTNOT) Set(column string, values ...interface{})

Set set value

type Match

type Match struct {
	Column string
	Values interface{}
}

func (*Match) GetTag

func (m *Match) GetTag() string

GetTag get tag

func (*Match) Set

func (m *Match) Set(column string, values ...interface{})

Set set value

type Max

type Max struct {
	Alias string
	Value interface{}
}

Max Max

func (*Max) GetTag

func (max *Max) GetTag() string

GetTag GetTag

func (*Max) Set

func (max *Max) Set(alias string, values ...interface{})

Set

type Min

type Min struct {
	Alias string
	Value interface{}
}

Min Min

func (*Min) GetTag

func (min *Min) GetTag() string

GetTag GetTag

func (*Min) Set

func (min *Min) Set(alias string, values ...interface{})

Set

type PageData

type PageData struct {
	Value []map[string]interface{}
	Total int64
}

PageData entities of table

type QueryBuilder

type QueryBuilder interface {
	Writer
	WriteQuoted(field string)
	AddVar(value interface{})
	GetVar() interface{}
}

QueryBuilder db condition builder

type RANGE

type RANGE struct {
	Column string
	Vars   []interface{}
}

func (*RANGE) GetTag

func (r *RANGE) GetTag() string

func (*RANGE) Set

func (r *RANGE) Set(column string, values ...interface{})

type SHOULD

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

func (*SHOULD) GetTag

func (s *SHOULD) GetTag() string

GetTag get tag

func (*SHOULD) LSet

func (l *SHOULD) LSet(values ...interface{})

LSet set value

func (*SHOULD) Set

func (s *SHOULD) Set(column string, values ...interface{})

Set set value

type Sum

type Sum struct {
	Alias string
	Value interface{}
}

Sum Sum

func (*Sum) GetTag

func (sum *Sum) GetTag() string

GetTag GetTag

func (*Sum) Set

func (sum *Sum) Set(alias string, values ...interface{})

Set

type Term

type Term struct {
	Column string
	Values []interface{}
}

func (*Term) GetTag

func (t *Term) GetTag() string

GetTag get tag

func (*Term) Set

func (t *Term) Set(column string, values ...interface{})

Set set value

type Terms

type Terms struct {
	Column string
	Values []interface{}
}

func (*Terms) GetTag

func (t *Terms) GetTag() string

GetTag get tag

func (*Terms) Set

func (t *Terms) Set(column string, values ...interface{})

Set set value

type Writer

type Writer interface {
	WriteByte(byte) error
	WriteString(string) (int, error)
}

Writer write

Jump to

Keyboard shortcuts

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