filter

package
v0.0.0-...-9f91e3f Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2018 License: BSD-3-Clause Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoolExpr

type BoolExpr interface {
	Node
	Value(data map[string]interface{}) (bool, error)
}

func NewFilter

func NewFilter(expression string) (BoolExpr, error)

NewFilter returns new filter for table expression: "table_name", "field == val OR field2 > 5"

type FilterSet

type FilterSet map[string]BoolExpr

func NewFilterSet

func NewFilterSet(expression string) (FilterSet, error)

NewFilterSet returns new filters for expression: table_name(field == "val"),table02(field02 != "val2" AND field03 == 123)

type Node

type Node interface {
	Type() NodeType
}

func NewOpLike

func NewOpLike(field, reSource string) (Node, error)

type NodeType

type NodeType string

type OpAnd

type OpAnd struct {
	// contains filtered or unexported fields
}

OpAnd - AND operation

func (OpAnd) Type

func (o OpAnd) Type() NodeType

func (OpAnd) Value

func (o OpAnd) Value(data map[string]interface{}) (bool, error)

type OpEq

type OpEq struct {
	// contains filtered or unexported fields
}

OpEq - =

func (OpEq) Type

func (o OpEq) Type() NodeType

func (OpEq) Value

func (o OpEq) Value(data map[string]interface{}) (bool, error)

type OpGe

type OpGe struct {
	// contains filtered or unexported fields
}

OpGe - >=

func (OpGe) Type

func (o OpGe) Type() NodeType

func (OpGe) Value

func (o OpGe) Value(data map[string]interface{}) (bool, error)

type OpGt

type OpGt struct {
	// contains filtered or unexported fields
}

OpGt - >

func (OpGt) Type

func (o OpGt) Type() NodeType

func (OpGt) Value

func (o OpGt) Value(data map[string]interface{}) (bool, error)

type OpIn

type OpIn struct {
	// contains filtered or unexported fields
}

OpIn - IN

func (OpIn) Type

func (o OpIn) Type() NodeType

func (OpIn) Value

func (o OpIn) Value(data map[string]interface{}) (bool, error)

type OpIsNull

type OpIsNull struct {
	// contains filtered or unexported fields
}

OpIsNull - IS NULL

func (OpIsNull) Type

func (o OpIsNull) Type() NodeType

func (OpIsNull) Value

func (o OpIsNull) Value(data map[string]interface{}) (bool, error)

type OpLe

type OpLe struct {
	// contains filtered or unexported fields
}

OpLe - <=

func (OpLe) Type

func (o OpLe) Type() NodeType

func (OpLe) Value

func (o OpLe) Value(data map[string]interface{}) (bool, error)

type OpLike

type OpLike struct {
	// contains filtered or unexported fields
}

OpLike - "field LIKE '%ww_ww%'"

func (OpLike) Type

func (o OpLike) Type() NodeType

func (OpLike) Value

func (o OpLike) Value(data map[string]interface{}) (bool, error)

type OpLt

type OpLt struct {
	// contains filtered or unexported fields
}

OpLt - <

func (OpLt) Type

func (o OpLt) Type() NodeType

func (OpLt) Value

func (o OpLt) Value(data map[string]interface{}) (bool, error)

type OpNe

type OpNe struct {
	// contains filtered or unexported fields
}

OpNe - !=

func (OpNe) Type

func (o OpNe) Type() NodeType

func (OpNe) Value

func (o OpNe) Value(data map[string]interface{}) (bool, error)

type OpNop

type OpNop struct{}

OpNop

func (OpNop) Type

func (o OpNop) Type() NodeType

func (OpNop) Value

func (o OpNop) Value(data map[string]interface{}) (bool, error)

type OpNot

type OpNot struct {
	// contains filtered or unexported fields
}

OpNot - NOT operation

func (OpNot) Type

func (o OpNot) Type() NodeType

func (OpNot) Value

func (o OpNot) Value(data map[string]interface{}) (bool, error)

type OpOr

type OpOr struct {
	// contains filtered or unexported fields
}

OpOr - OR operation

func (OpOr) Type

func (o OpOr) Type() NodeType

func (OpOr) Value

func (o OpOr) Value(data map[string]interface{}) (bool, error)

type Rule

type Rule struct {
	// contains filtered or unexported fields
}

type RuleItem

type RuleItem struct {
	// contains filtered or unexported fields
}

func (RuleItem) Type

func (ri RuleItem) Type() NodeType

type SrcNode

type SrcNode string

func (SrcNode) Type

func (sn SrcNode) Type() NodeType

Jump to

Keyboard shortcuts

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