query

package
v2.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseFieldToColumn

func ParseFieldToColumn(field string) (clause.Column, error)

Types

type Builder

type Builder struct {
	Type         LogicOperator   `json:"type"`
	Field        string          `json:"field"`         // 普通字段
	FieldAdvance *clause.Column  `json:"field_advance"` // 高级字段配置
	OperatorType string          `json:"operator_type"` // 操作符类型
	Operator     string          `json:"operator"`
	Value        any             `json:"value"`
	ValueAdvance []clause.Column `json:"value_advance"` // 高级值配置
	Conditions   []Builder       `json:"conditions"`
}

func (*Builder) ToES

func (b *Builder) ToES() map[string]any

func (*Builder) ToGORM

func (b *Builder) ToGORM() clause.Expression

type LogicOperator

type LogicOperator string

LogicOperator 逻辑操作符类型

const (
	AND LogicOperator = "and"
	Or  LogicOperator = "or"
)

func (LogicOperator) String

func (l LogicOperator) String() string

func (LogicOperator) ToLower

func (l LogicOperator) ToLower() LogicOperator

Jump to

Keyboard shortcuts

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