query

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2019 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	True  = boolean(true)
	False = boolean(false)
)

Functions

This section is empty.

Types

type Context

type Context interface {
	GetIdentifier(string) string
}

Defines the interface needed by 'Query' in order to be able to evaluate query expressions.

type Map added in v0.3.2

type Map map[string]string

Map is a simple implementation of Context using a map of strings. Mainly useful for testing purposes.

func (Map) GetIdentifier added in v0.3.2

func (self Map) GetIdentifier(key string) string

type Query

type Query interface {
	Eval(Context) bool
}

Representation of a tree node modeling a boolean query expression.

func And

func And(items ...Query) Query

func Equal

func Equal(identifier, str string) Query

func Match

func Match(identifier, regexpString string) (Query, error)

func Not

func Not(item Query) Query

func Or

func Or(items ...Query) Query

func Parse

func Parse(query string) (Query, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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