query

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2014 License: BSD-3-Clause, GPL-3.0, MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TagNames

func TagNames(expression Expression) []string

Retrieves the set of tag names from an expression

func Type

func Type(token Token) string

func ValueNames added in v0.4.0

func ValueNames(expression Expression) []string

Retrieves the set of value names from an expression

Types

type AndExpression

type AndExpression struct {
	LeftOperand  Expression
	RightOperand Expression
}

type AndOperatorToken

type AndOperatorToken struct {
}

type CloseParenToken

type CloseParenToken struct {
}

type ComparisonExpression added in v0.4.0

type ComparisonExpression struct {
	Tag      TagExpression
	Operator string
	Value    ValueExpression
}

type ComparisonOperatorToken added in v0.4.0

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

type EmptyExpression added in v0.4.0

type EmptyExpression struct {
}

type EndToken

type EndToken struct {
}

type Expression

type Expression interface {
}

func HasAll added in v0.4.0

func HasAll(tagNames []string) Expression

Creates an 'and' expression for all the tag names specified

func Parse

func Parse(query string) (Expression, error)

type NotExpression

type NotExpression struct {
	Operand Expression
}

type NotOperatorToken

type NotOperatorToken struct {
}

type OpenParenToken

type OpenParenToken struct {
}

type OrExpression

type OrExpression struct {
	LeftOperand  Expression
	RightOperand Expression
}

type OrOperatorToken

type OrOperatorToken struct {
}

type Parser

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

func NewParser

func NewParser(scanner *Scanner) Parser

func (Parser) Parse

func (parser Parser) Parse() (Expression, error)

type Scanner

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

func NewScanner

func NewScanner(query string) *Scanner

func (*Scanner) LookAhead

func (scanner *Scanner) LookAhead() (Token, error)

func (*Scanner) Next

func (scanner *Scanner) Next() (Token, error)

type SymbolToken added in v0.4.0

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

type TagExpression

type TagExpression struct {
	Name string
}

type Token

type Token interface {
}

type ValueExpression added in v0.4.0

type ValueExpression struct {
	Name string
}

Jump to

Keyboard shortcuts

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