dto

package
v1.0.1-dev-02 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: MulanPSL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InjectQueryField

func InjectQueryField(s *QueryField)

func LoadQueryField

func LoadQueryField() baseiface.ISingleton

Types

type OrderByDto

type OrderByDto struct {
	//字段名 camlecase or case
	Field string `json:"field"`
	//排序:asc or desc
	Sort     string `json:"sort"`     //desc  asc
	SortType string `json:"sortType"` //sort score field //NewScoreSort

}

@Title 文件名称: order_by_dto.go @Description 描述: OrderByDto

@Author  作者: leijianming@163.com  时间(2024-02-21 22:38:21)
@Update  作者: leijianming@163.com  时间(2024-02-21 22:38:21)

排序

func NewOrderByDto

func NewOrderByDto() *OrderByDto

func OrderBy

func OrderBy(field, sort string) *OrderByDto

func (*OrderByDto) SetField

func (this *OrderByDto) SetField(field string)

func (*OrderByDto) SetSort

func (this *OrderByDto) SetSort(sort string)

func (*OrderByDto) ToOrderBy

func (this *OrderByDto) ToOrderBy() string

type QueryField

type QueryField struct {
	basedto.BaseEntity
	// 字段名 小写
	Field string `json:"field"`
	//比较符 = != > < >= <= between notbetween in notin like notlike
	OpType base.FieldSign `json:"op_type"`
	//比较值:一个或多个值
	Values     []interface{} `json:"values,omitempty"`
	EsBoolType int           `json:"es_bool_type,omitempty"`
}

通用查询条件

func FindBeanQueryField

func FindBeanQueryField() *QueryField

func NewFields

func NewFields(field string, opType int, opValues []any) *QueryField

func NewQueryField

func NewQueryField() *QueryField

func (*QueryField) CheckType

func (this *QueryField) CheckType() string

func (*QueryField) Field2Keyword

func (this *QueryField) Field2Keyword() string

func (*QueryField) SetField

func (this *QueryField) SetField(field string)

func (*QueryField) Values2InStr

func (this *QueryField) Values2InStr() string

Jump to

Keyboard shortcuts

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