Help us shape the future of Go! Take the 2026 Go Developer Survey

share

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2026 License: Apache-2.0 Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Filters map[string]Helper = map[string]Helper{
	"pluck": func(args ...interface{}) interface{} { return args },
}

Filters 处理函数

Functions

func RegisterHelper

func RegisterHelper(name string, helper Helper)

RegisterHelper 注册 helper

Types

type DSL

type DSL interface {
	Load(interface{}) (DSL, error)   // 查询条件预载入
	Run(data maps.Map) interface{}   // 执行查询根据查询条件返回结果
	Get(data maps.Map) []Record      // 执行查询并返回数据记录集合
	Paginate(data maps.Map) Paginate // 执行查询并返回带分页信息的数据记录数组
	First(data maps.Map) Record      // 执行查询并返回一条数据记录
}

DSL QueryDSL Interface

type Helper

type Helper func(...interface{}) interface{}

Helper 转换器

type Paginate

type Paginate struct {
	Items     []Record `json:"items"`    // 数据记录集合
	Total     int      `json:"total"`    // 总记录数
	Next      int      `json:"next"`     // 下一页,如没有下一页返回 -1
	Prev      int      `json:"prev"`     // 上一页,如没有上一页返回 -1
	Page      int      `json:"page"`     // 当前页码
	PageSize  int      `json:"pagesize"` // 每页记录数量
	PageCount int      `json:"pagecnt"`  // 总页数
}

Paginate 带分页信息的数据记录数组

type Record

type Record maps.MapStrAny

Record 数据记录

Jump to

Keyboard shortcuts

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