filter

package
v0.1.25 Latest Latest
Warning

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

Go to latest
Published: May 28, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Condition

type Condition interface {
	String() string
	Apply() (string, []interface{}, error)
}

func NewCondition

func NewCondition(f string, op Operator, value interface{}) Condition

type Filter

type Filter interface {
	String() string
	WhereField(field string, op Operator, value interface{}) Filter
	OrWhereField(field string, op Operator, value interface{}) Filter
	//Group(l Logic) Filter
	Apply() (string, []interface{}, error)
}

func NewFilter

func NewFilter() Filter

type Operator

type Operator string
const (
	OpEq    Operator = "="
	OpLt    Operator = "<"
	OpGt    Operator = ">"
	OpLtEq  Operator = "<="
	OpGtEq  Operator = ">="
	OpNotEq Operator = "<>"
	OpLike  Operator = "LIKE"
	OpIn    Operator = "IN"
)

Jump to

Keyboard shortcuts

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