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

crud

package
v0.9.15 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NumberType   = "Number"
	StringType   = "String"
	EnumType     = "Enum"
	DateTimeType = "DateTime"
	DateType     = "Date"
	BooleanType  = "Boolean"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Column

type Column struct {
	Key            string
	Label          string
	Type           string
	Searchable     bool
	Sortable       bool
	Filterable     bool
	Visible        bool
	FilterValidMap []FilterValue
}

type Crud

type Crud struct {
}

func (*Crud) ExtractListParams

func (c *Crud) ExtractListParams(cols []Column, request *ListRequest) SearchParams

func (*Crud) GenerateListMysqlQuery added in v0.8.4

func (c *Crud) GenerateListMysqlQuery(params SearchParams) *beeorm.Where

func (*Crud) GenerateListRedisSearchQuery

func (c *Crud) GenerateListRedisSearchQuery(params SearchParams) *beeorm.RedisSearchQuery

TODO : add full text queries when supported by hitrix

type FilterValue added in v0.8.8

type FilterValue struct {
	Key   string
	Label string
}

type ListRequest

type ListRequest struct {
	Page     *int
	PageSize *int
	Filter   map[string]interface{}
	Search   map[string]interface{}
	SearchOR map[string]interface{}
	Sort     map[string]interface{}
}

type SearchParams

type SearchParams struct {
	Page           int
	PageSize       int
	Search         map[string]string
	SearchOR       map[string]string
	StringFilters  map[string]string
	NumberFilters  map[string]int64
	BooleanFilters map[string]bool
	Sort           map[string]bool
}

Jump to

Keyboard shortcuts

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