condition

package
v3.1.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BKDBIN the db operator
	BKDBIN = "$in"

	// BKDBOR the db operator
	BKDBOR = "$or"

	// BKDBLIKE the db operator
	BKDBLIKE = "$regex"

	// BKDBEQ the db operator
	BKDBEQ = "$eq"

	// BKDBNE the db operator
	BKDBNE = "$ne"

	// BKDBNIN the db oeprator
	BKDBNIN = "$nin"

	// BKDBNot the db opeartor
	BKDBNot = "$not"

	// BKDBLT the db operator
	BKDBLT = "$lt"

	// BKDBLTE the db operator
	BKDBLTE = "$lte"

	// BKDBGT the db operator
	BKDBGT = "$gt"

	// BKDBGTE the db opeartor
	BKDBGTE = "$gte"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Condition

type Condition interface {
	SetPage(page types.MapStr) error
	SetStart(start int64)
	GetStart() int64
	SetLimit(limit int64)
	GetLimit() int64
	SetSort(sort string)
	GetSort() string
	SetFields(fields []string)
	GetFields() []string
	Field(fieldName string) Field
	Parse(data types.MapStr) error
	ToMapStr() types.MapStr
}

Condition condition interface

func CreateCondition

func CreateCondition() Condition

CreateCondition create a condition object

type Field

type Field interface {
	Eq(val interface{}) Condition
	NotEq(val interface{}) Condition
	Like(val interface{}) Condition
	In(val interface{}) Condition
	NotIn(val interface{}) Condition
	Lt(val interface{}) Condition
	Lte(val interface{}) Condition
	Gt(val interface{}) Condition
	NotGt(val interface{}) Condition
	Gte(val interface{}) Condition
	ToMapStr() types.MapStr
}

Field create a field

Jump to

Keyboard shortcuts

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