caql

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrStack     = errors.New("unexpected operator stack")
	ErrUndefined = errors.New("variable not defined")
)
View Source
var ErrBadPattern = errors.New("syntax error in pattern")

ErrBadPattern indicates a pattern was malformed.

View Source
var ErrTooComplex = errors.New("unsupported features for index queries, use advanced search instead")

Functions

This section is empty.

Types

type Parser

type Parser struct {
	Searcher Searcher
	Prefix   string
}

func (*Parser) Parse

func (p *Parser) Parse(aql string) (t *Tree, err error)

type Searcher

type Searcher interface {
	Search(term string) (ids []string, err error)
}

type Set

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

func NewSet added in v0.9.2

func NewSet(initial ...any) *Set

func (*Set) Difference

func (s *Set) Difference(set *Set) *Set

func (*Set) Has

func (s *Set) Has(element any) bool

func (*Set) Insert

func (s *Set) Insert(element any)

func (*Set) Intersection

func (s *Set) Intersection(set *Set) *Set

func (*Set) Len

func (s *Set) Len() int

func (*Set) Minus

func (s *Set) Minus(set *Set) *Set

func (*Set) ProperSubsetOf

func (s *Set) ProperSubsetOf(set *Set) bool

func (*Set) Remove

func (s *Set) Remove(element any)

func (*Set) SubsetOf

func (s *Set) SubsetOf(set *Set) bool

func (*Set) Union

func (s *Set) Union(set *Set) *Set

func (*Set) Values

func (s *Set) Values() []any

type Tree

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

func (*Tree) BleveString

func (t *Tree) BleveString() (s string, err error)

func (*Tree) Eval

func (t *Tree) Eval(values map[string]any) (i any, err error)

func (*Tree) String

func (t *Tree) String() (s string, err error)

Jump to

Keyboard shortcuts

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