query

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyExpression       = errors.New("multiple expressions detected")
	ErrEmptyFuncCall         = errors.New("empty function call")
	ErrEmptyParenthesis      = errors.New("empty parenthesis")
	ErrInvalidArgument       = errors.New("invalid argument")
	ErrInvalidFuncName       = errors.New("invalid function name")
	ErrMissingArgument       = errors.New("missing argument")
	ErrMissingOperator       = errors.New("missing operator")
	ErrUnexpectedComma       = errors.New("unexpected comma")
	ErrUnexpectedOperator    = errors.New("unexpected operator")
	ErrUnexpectedParenthesis = errors.New("unexpected parenthesis")
)
View Source
var ErrTokenizer = errors.New("unexpected tokenizer error")
View Source
var ErrUnclosedString = errors.New("missing quotes to close of a string")

Functions

This section is empty.

Types

type ArgsListExpr

type ArgsListExpr interface {
	Expr
	Args() []Expr
}

type BinaryExpr

type BinaryExpr interface {
	Expr
	Operands() *BinaryOperands
}

type BinaryOperands

type BinaryOperands struct {
	LHS Expr
	RHS Expr
}

type Expr

type Expr interface {
	String() string
	Pos() Position
	// contains filtered or unexported methods
}

func Parse

func Parse(dl *logger.Builder, query string) (Expr, error)

type ExprArgsList

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

func (*ExprArgsList) Args

func (e *ExprArgsList) Args() []Expr

func (*ExprArgsList) Pos

func (e *ExprArgsList) Pos() Position

func (*ExprArgsList) String

func (e *ExprArgsList) String() string

type ExprBool

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

func (*ExprBool) Pos

func (e *ExprBool) Pos() Position

func (*ExprBool) String

func (e *ExprBool) String() string

func (*ExprBool) Value

func (e *ExprBool) Value() bool

type ExprDelta

type ExprDelta struct {
	BinaryOperands
	// contains filtered or unexported fields
}

func (*ExprDelta) Operands

func (e *ExprDelta) Operands() *BinaryOperands

func (*ExprDelta) Pos

func (e *ExprDelta) Pos() Position

func (*ExprDelta) String

func (e *ExprDelta) String() string

type ExprFunc

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

func (*ExprFunc) Args

func (e *ExprFunc) Args() ArgsListExpr

func (*ExprFunc) Name

func (e *ExprFunc) Name() string

func (*ExprFunc) Pos

func (e *ExprFunc) Pos() Position

func (*ExprFunc) String

func (e *ExprFunc) String() string

type ExprInteger

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

func (*ExprInteger) Pos

func (e *ExprInteger) Pos() Position

func (*ExprInteger) String

func (e *ExprInteger) String() string

func (*ExprInteger) Value

func (e *ExprInteger) Value() int

type ExprIntersect

type ExprIntersect struct {
	BinaryOperands
	// contains filtered or unexported fields
}

func (*ExprIntersect) Operands

func (e *ExprIntersect) Operands() *BinaryOperands

func (*ExprIntersect) Pos

func (e *ExprIntersect) Pos() Position

func (*ExprIntersect) String

func (e *ExprIntersect) String() string

type ExprString

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

func (*ExprString) Pos

func (e *ExprString) Pos() Position

func (*ExprString) String

func (e *ExprString) String() string

func (*ExprString) Value

func (e *ExprString) Value() string

type ExprSubtract

type ExprSubtract struct {
	BinaryOperands
	// contains filtered or unexported fields
}

func (*ExprSubtract) Operands

func (e *ExprSubtract) Operands() *BinaryOperands

func (*ExprSubtract) Pos

func (e *ExprSubtract) Pos() Position

func (*ExprSubtract) String

func (e *ExprSubtract) String() string

type ExprUnion

type ExprUnion struct {
	BinaryOperands
	// contains filtered or unexported fields
}

func (*ExprUnion) Operands

func (e *ExprUnion) Operands() *BinaryOperands

func (*ExprUnion) Pos

func (e *ExprUnion) Pos() Position

func (*ExprUnion) String

func (e *ExprUnion) String() string

type FuncExpr

type FuncExpr interface {
	Expr
	Name() string
	Args() ArgsListExpr
}

type Position

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

func (*Position) String

func (p *Position) String() string

type ValueExpr

type ValueExpr interface {
	Expr
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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