package
0.1.4
Repository: https://github.com/lytics/qlbridge.git
Documentation: pkg.go.dev

# Packages

Builtin functions are a library of functions natively available in qlbridge expression evaluation although adding your own is easy.

# Functions

EmptyEvalFunc a no-op evaluation function for use in.
No description provided by the author
FilterSpecialIdentities given a list of identities, filter out special identities such as "null", "*", "match_all".
FindAllIdentities gets all identity.
FindAllIdentityField Recursively descend down a node looking for all Identity Fields min(year) == {year} eq(min(user.name), max(month)) == {user.name, month} .
FindAllLeftIdentityFields Recursively descend down a node looking for all LEFT Identity Fields min(year) == {year} eq(min(user.name), max(month)) == {user, month} .
FindFirstIdentity Recursively descend down a node looking for first Identity Field min(year) == year eq(min(item), max(month)) == item eq(min(user.last_name), max(month)) == user.last_name .
FindIdentityName Recursively walk a node looking for first Identity Field and combine with outermost expression to create an alias min(year) => "min_year" eq(min(year), max(month)) => "eq_year EXISTS url => "exists_url".
FindIncludes recursively descend down a node looking for all Include identities.
FuncAdd Global add Functions to the VM func registry occurs here.
IdentityMaybeEscape Quote an identity/literal if need be (has illegal characters or spaces).
IdentityMaybeQuote.
IdentityMaybeQuoteStrict Quote an identity if need be (has illegal characters or spaces) First character MUST be alpha (not numeric or any other character).
IdentityMaybeQuoteStrict Quote an identity if need be (has illegal characters or spaces) First character MUST be alpha (not numeric or any other character).
IdentityTrim trims the leading/trailing identity quote marks ` or [].
InlineIncludes take an expression and resolve any includes so that the included expression is "Inline".
IsValidIdentity test the given string to determine if any characters are not valid and therefore must be quoted.
LeftRight Return left, right values if is of form `table.column` or `schema`.`table` also return true/false for if it even has left/right.
LiteralQuoteEscape escape string that may need characters escaped LiteralQuoteEscape("'","item's") => 'item''s' LiteralQuoteEscape(`"`,"item's") => "item's" LiteralQuoteEscape(`"`,`item"s`) => "item""s" .
LiteralQuoteEscapeBuf escape string that may need characters escaped LiteralQuoteEscapeBuf("'","item's") => 'item''s' LiteralQuoteEscapeBuf(`"`,"item's") => "item's" LiteralQuoteEscapeBuf(`"`,`item"s`) => "item""s" .
MustParse parse a single Expression, returning an Expression Node and panics if it cannot be parsed MustParse("5 * toint(item_name)") .
NewArrayNode Create an array of Nodes which is a valid node type for boolean IN operator.
No description provided by the author
Create a Binary node @operator = * + - %/ / && || = == @operator = and, or, "is not" @lhArg, rhArg the left, right side of binary.
NewBooleanNode Create a boolean node @operator = AND, OR @args = nodes.
NewDefaultNoNamspaceWriter uses mysql escaping rules literals=" identity=` Strip namespaces so that 'users.first_name` becomes `first_name` (strip users.).
NewDefaultWriter uses mysql escaping rules literals=" identity=`.
NewDialectWriter creates a writer that is custom literal and identity escape characters.
No description provided by the author
No description provided by the author
NewFuncNode create new Function Expression Node.
NewFuncRegistry create a new function registry.
No description provided by the author
No description provided by the author
Include nodes NOT INCLUDE <identity> ! INCLUDE <identity> INCLUDE <identity> .
NewIncludeContext a new IncludeContext from contextreader.
NewJSONDialectWriter escape literal " with \".
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewNumberStr is a little weird in that this Node accepts string @text and uses go to parse into Int, AND Float.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Create a Tri node @arg1 [NOT] BETWEEN @arg2 AND @arg3 .
Unary nodes NOT <expression> ! <expression> EXISTS <identity> <identity> IS NOT NULL .
No description provided by the author
No description provided by the author
NodeFromNodePb Create a node from pb.
NodeFromPb Create a node from pb.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ParseExpression parse a single Expression, returning an Expression Node ParseExpression("5 * toint(item_name)") .
Parse a single Expression, returning an Expression Node @fr = function registry with any additional functions ParseExprWithFuncs("5 * toint(item_name)", funcRegistry) .
Parse a single Expression, returning an Expression Node @pager = Token Pager.
StringEscape escape string that may need characters escaped StringEscape("'","item's") => "item''s" .
StringUnEscape remove escaping on string that may need characters escaped StringUnEscape(`"`,`item"s`) => "item""s", true .
ValueArray IN ("a","b","c") ["a","b","c"].
ValueTypeFromNode Infer Value type from Node.

# Variables

We have a default Dialect, which is the "Language" or rule-set of ql.
ErrIncludeNotFound Include Not Found.
ErrInternalError Internal Error.
No description provided by the author
No description provided by the author
If we hit max depth.
ErrNoIncluder is message saying a FilterQL included reference to an include when no Includer was available to resolve.
ErrNotImplemented an error of expression/statement syntax not being supported.
ErrNotSupported indicates an error of a piece of expression syntax not being supported.
ErrUnknownCommand Unknown Command.
No description provided by the author

# Structs

No description provided by the author
Array Node.
No description provided by the author
Binary Node, two child args.
No description provided by the author
Boolean Node, n child args.
No description provided by the author
The generic Expr.
No description provided by the author
No description provided by the author
Func Node, args are children.
No description provided by the author
No description provided by the author
Identity.
IncludeContext A ContextReader that implements Include interface.
No description provided by the author
Include Node, two child args.
TokenPager is responsible for determining end of current tree (column, etc).
The generic Node, must be exactly one of these types.
No description provided by the author
NullNode.
No description provided by the author
Number Node.
No description provided by the author
String literal, no children.
No description provided by the author
Tri Node, may hve children.
No description provided by the author
Unary Node, one child.
No description provided by the author
Value Node.

# Interfaces

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Includer defines an interface used for resolving INCLUDE clauses into a Include reference.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
SchemaInfo is interface for a Column type.
TokenPager wraps a Lexer, and implements the Logic to determine what is the end of this particular clause.

# Type aliases

No description provided by the author
No description provided by the author
SchemaInfoString implements schemaInfo Key().