package
0.1.3
Repository: https://github.com/xwc1125/xwc1125-pkg.git
Documentation: pkg.go.dev

# README

Search库

type描述query示例
exact/iexact等于status=1
contains/icontanins包含name=n
gt/gte大于/大于等于age=18
lt/lte小于/小于等于age=18
startswith/istartswith以…起始content=hell
endswith/iendswith以…结束content=world
inin查询status[]=0&status[]=1
isnullisnull查询startTime=1
order排序sort=asc/sort=desc

e.g.

type ApplicationQuery struct {
	Id       string    `search:"type:icontains;column:id;table:receipt" form:"id"`
	Domain   string    `search:"type:icontains;column:domain;table:receipt" form:"domain"`
	Version  string    `search:"type:exact;column:version;table:receipt" form:"version"`
	Status   []int     `search:"type:in;column:status;table:receipt" form:"status"`
	Start    time.Time `search:"type:gte;column:created_at;table:receipt" form:"start"`
	End      time.Time `search:"type:lte;column:created_at;table:receipt" form:"end"`
	TestJoin `search:"type:left;on:id:receipt_id;table:receipt_goods;join:receipts"`
	ApplicationOrder
}
type ApplicationOrder struct {
	IdOrder string `search:"type:order;column:id;table:receipt" form"id_order"`
}

type TestJoin struct {
	PaymentAccount string `search:"type:icontains;column:payment_account;table:receipts" form:"payment_account"`
}

# Functions

No description provided by the author
ResolveSearchQuery 解析* * exact / iexact 等于 * contains / icontains 包含 * gt / gte 大于 / 大于等于 * lt / lte 小于 / 小于等于 * startswith / istartswith 以…起始 * endswith / iendswith 以…结束 * in * isnull * order 排序 e.g.

# Constants

No description provided by the author
字段标签.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
大于等于.
大于.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
连接标签.
No description provided by the author
小于等于.
小于.
Mysql 数据库标识.
on标签.
No description provided by the author
Postgres 数据库标识.
连接标签.
No description provided by the author
表标签.
类型标签.

# Variables

QueryTag tag标记.

# Structs

OrmCondition Orm查询的条件.
OrmJoin 连接标签.
OrmWhere 查询条件,where、order、or.

# Interfaces

Condition 条件.