condition

package
v2.0.17 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type And

type And []Condition

func (And) Build

func (ac And) Build() (sql string, args []any)

type BeginWith

type BeginWith struct {
	Field string `json:"field"`
	Words string `json:"words"`
}

func (BeginWith) Build

func (b BeginWith) Build() (sql string, args []any)

type Between

type Between struct {
	Field string `json:"field"`
	Start any    `json:"start"`
	End   any    `json:"end"`
}

func (Between) Build

func (b Between) Build() (sql string, args []any)

type Condition

type Condition interface {
	Build() (sql string, args []any)
}

type Contains

type Contains struct {
	Field string `json:"field"`
	Words string `json:"words"`
}

func (Contains) Build

func (c Contains) Build() (sql string, args []any)

type Empty

type Empty struct {
	Field string `json:"field"`
}

func (Empty) Build

func (e Empty) Build() (sql string, args []any)

type Equal

type Equal struct {
	Field string
	Value any
}

func (Equal) Build

func (e Equal) Build() (sql string, args []any)

type Gt

type Gt struct {
	Field string `json:"field"`
	Value any    `json:"value"`
}

func (Gt) Build

func (g Gt) Build() (sql string, args []any)

type Gte

type Gte struct {
	Field string `json:"field"`
	Value any    `json:"value"`
}

func (Gte) Build

func (g Gte) Build() (sql string, args []any)

type In

type In[T any] struct {
	Field string        `json:"field"`
	Value kind.Slice[T] `json:"value"`
}

func (In[T]) Build

func (i In[T]) Build() (sql string, args []any)

type Lt

type Lt struct {
	Field string `json:"field"`
	Value any    `json:"value"`
}

func (Lt) Build

func (l Lt) Build() (sql string, args []any)

type Lte

type Lte struct {
	Field string `json:"field"`
	Value any    `json:"value"`
}

func (Lte) Build

func (l Lte) Build() (sql string, args []any)

type Not

type Not struct {
	Condition Condition
}

func (Not) Build

func (n Not) Build() (sql string, args []any)

type NotEmpty

type NotEmpty struct {
	Field string `json:"field"`
}

func (NotEmpty) Build

func (ne NotEmpty) Build() (sql string, args []any)

type NotEqual

type NotEqual struct {
	Field string
	Value any
}

func (NotEqual) Build

func (ne NotEqual) Build() (sql string, args []any)

type NotIn

type NotIn[T any] struct {
	Field string        `json:"field"`
	Value kind.Slice[T] `json:"value"`
}

func (NotIn[T]) Build

func (ni NotIn[T]) Build() (sql string, args []any)

type NotNull

type NotNull struct {
	Field string `json:"field"`
}

func (NotNull) Build

func (nn NotNull) Build() (sql string, args []any)

type Null

type Null struct {
	Field string `json:"field"`
}

func (Null) Build

func (n Null) Build() (sql string, args []any)

type Or

type Or []Condition

func (Or) Build

func (oc Or) Build() (sql string, args []any)

Jump to

Keyboard shortcuts

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