search

package
v0.0.0-...-39e3969 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Eq        operator = "E"
	NotEq     operator = "NE"
	Gt        operator = "GT"
	Lt        operator = "LT"
	Gte       operator = "GTE"
	Lte       operator = "LTE"
	Like      operator = "LK"
	NotLike   operator = "NLK"
	LikeLeft  operator = "LKL"
	LikeRight operator = "LKR"
	In        operator = "IN"
	NotIn     operator = "NIN"
	IsNotNull operator = "NNU"
	IsNull    operator = "NU"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Condition

type Condition struct {
	Field     string      `json:"f"`
	Operator  operator    `json:"k"`
	Value     interface{} `json:"v"`
	Connector string      `json:"g"`
	Children  []Condition `json:"s"`
	// contains filtered or unexported fields
}

type Container

type Container struct {
	Condition   Condition `json:"c"`
	Orders      []Order   `json:"o"`
	WhereSQL    strings.Builder
	OrderSQL    strings.Builder
	WhereParams map[string]interface{}
	// contains filtered or unexported fields
}

func (*Container) Bind

func (c *Container) Bind(checklist map[string]string) error

func (*Container) BuildQuery

func (c *Container) BuildQuery(query *gorm.DB) *gorm.DB

func (*Container) Reset

func (c *Container) Reset()

type Order

type Order struct {
	Field string `json:"f"`

	Sort string `json:"k"`
	// contains filtered or unexported fields
}

type Orders

type Orders []Order

Jump to

Keyboard shortcuts

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