dao

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AND2OR = []string{"AND", "OR"}
	NOT    = []string{"", "NOT"}
)

Functions

This section is empty.

Types

type Operator

type Operator interface {
	OperatorSQL(operator string) string
}

type QuerySet

type QuerySet interface {
	GetFilterSQL() (string, []interface{})
	FilterToSQL(filter map[string]interface{})
	GetOrderBySQL() string
	OrderByToSQL(orderBy []string)
	GetLimitSQL() string
	LimitToSQL(pageSize, pageNum int)
}

type QuerySetImpl

type QuerySetImpl struct {
	Operator
	// contains filtered or unexported fields
}

func NewQuerySet

func NewQuerySet(op Operator) *QuerySetImpl

func (*QuerySetImpl) FilterToSQL

func (p *QuerySetImpl) FilterToSQL(filter map[string]interface{})

func (*QuerySetImpl) GetFilterSQL

func (p *QuerySetImpl) GetFilterSQL() (string, []interface{})

func (*QuerySetImpl) GetLimitSQL

func (p *QuerySetImpl) GetLimitSQL() string

func (*QuerySetImpl) GetOrderBySQL

func (p *QuerySetImpl) GetOrderBySQL() string

func (*QuerySetImpl) LimitToSQL

func (p *QuerySetImpl) LimitToSQL(pageSize, pageNum int)

func (*QuerySetImpl) OrderByToSQL

func (p *QuerySetImpl) OrderByToSQL(orderBy []string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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