dao

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//AppID appid
	AppID = "main.archive.up-service"
	//UatToken uat token
	UatToken = "5f1660060bb011e8865c66d44b23cda7"
	//TreeID uat treeid
	TreeID = "15572"
)

Variables

This section is empty.

Functions

func ConcatCondition

func ConcatCondition(conditions ...Condition) (conditionStr string, args []interface{}, hasOperator bool)

ConcatCondition concat conditions

func Split

func Split(start int, end int, size int, f func(start int, end int))

Split split num by size; size should be positive

Types

type Condition

type Condition struct {
	Before   string
	Key      string
	Operator string
	Value    interface{}
	After    string
	// contains filtered or unexported fields
}

Condition 生成的condition为 [before] [key] [operator] ? [after] 如

[(]		[id] 	[=] 		? 	[and]
		[ctime] 	[>] 	? 	[)]
		[order by] [time] 	nil []  //如果value是nil,不会设置placeholder ?

func AndCondition

func AndCondition(conditions ...Condition) (result []Condition)

AndCondition and condition

func OrCondition

func OrCondition(conditions ...Condition) (result []Condition)

OrCondition or condition

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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