expr

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2020 License: MIT Imports: 7 Imported by: 0

README

expr

Boolean expressions evaluator.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Builder

func Builder(fields ...BuildField) string

Types

type BuildField

type BuildField func() string

func And

func And(fields ...BuildField) BuildField

func Eq

func Eq(name string, value interface{}) BuildField

type Filter

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

func BoolParam

func BoolParam(name string, opts ...ParamOption) *Filter

func EnumParam

func EnumParam(name string, values map[string]int32, opts ...ParamOption) *Filter

func IDParam

func IDParam(name string, opts ...ParamOption) *Filter

type Filters

type Filters []*Filter

func (Filters) ApplySQL

func (fs Filters) ApplySQL(q *database.Collection, query string) (*database.Collection, error)

type ParamOption

type ParamOption func(f *Filter)

func Required

func Required() ParamOption

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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