ql

package
v0.0.0-...-06831c0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Converter

func Converter(oo ...op) *converter

Converter initializes new converter

func DefaultRefHandler

func DefaultRefHandler(n *ql.ASTNode, args ...exp.Expression) (exp.Expression, error)

DefaultRefHandler converts ref from the AST node using ref2exp

func DefaultSymbolHandler

func DefaultSymbolHandler(n *ql.ASTNode) (exp.Expression, error)

DefaultSymbolHandler parses symbol from the AST node into an identifier

func DefaultValueHandler

func DefaultValueHandler(n *ql.ASTNode) (exp.Expression, error)

DefaultValueHandler converts node into placeholder and a new attribute

func RefHandler

func RefHandler(h refHandler) op

RefHandler sets custom ref handler

func SymHandler

func SymHandler(h symHandler) op

SymHandler sets custom symbol handler

func ValHandler

func ValHandler(h valHandler) op

ValHandler sets custom value handler

Types

type ASTNode

type ASTNode = ql.ASTNode

type ExprHandler

type ExprHandler struct {
	Handler      func(...exp.Expression) exp.Expression
	HandlerE     func(...exp.Expression) (exp.Expression, error)
	RangeHandler func(exp.Expression, exp.RangeVal) exp.Expression
}

type ExprHandlerMap

type ExprHandlerMap map[string]*ExprHandler

func (ExprHandlerMap) ExprHandlers

func (ee ExprHandlerMap) ExprHandlers() (out ExprHandlerMap)

func (ExprHandlerMap) RefHandler

func (ee ExprHandlerMap) RefHandler(n *ql.ASTNode, args ...exp.Expression) (exp.Expression, error)

Jump to

Keyboard shortcuts

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