# Packages
No description provided by the author
# Functions
ConstructLikeMatcher returns a new LikeMatcher.
No description provided by the author
ExpressionsResolved returns whether all the expressions in the slice given are resolved.
ExtractGetField returns the inner GetField expression from another expression.
GetConvertToType returns which type the both left and right values should be converted to.
GetDecimalPrecisionAndScale returns precision and scale for given string formatted float/double number.
GetPrecisionAndScale converts the value to string format and parses it to get the precision and scale.
IsBinary returns whether the expression is binary or not.
No description provided by the author
IsUnary returns whether the expression is unary or not.
JoinAnd joins several expressions with And.
JoinOr joins several expressions with Or.
LiteralToInt extracts a non-negative integer from an expression.Literal, or errors.
NewAlias returns a new Alias node.
NewAliasReference creates a new AliasReference from the specified alias name.
NewAnd creates a new And expression.
NewArithmetic creates a new Arithmetic sql.Expression.
NewAutoIncrement creates a new AutoIncrement expression.
NewAutoIncrementForColumn creates a new AutoIncrement expression for the column given.
NewAutoUuid creates a new AutoUuid expression.
NewBetween creates a new Between expression.
No description provided by the author
No description provided by the author
NewBitAnd creates a new BitOp & sql.Expression.
NewBitOp creates a new BitOp sql.Expression.
NewBitOr creates a new BitOp | sql.Expression.
NewBitXor creates a new BitOp ^ sql.Expression.
NewCase returns an new Case expression.
NewCollatedExpression creates a new CollatedExpression expression.
NewConvert creates a new Convert expression that will attempt to convert the specified expression |expr| into the |castToType| type.
No description provided by the author
NewConvertWithLengthAndScale creates a new Convert expression that will attempt to convert |expr| into the |castToType| type, with |typeLength| specifying a length constraint of the converted type, and |typeScale| specifying a scale constraint of the converted type.
NewDefaultColumn creates a new NewDefaultColumn expression.
No description provided by the author
NewDiv creates a new Div / sql.Expression.
NewEquals returns a new Equals expression.
NewGetField creates a GetField expression.
NewGetFieldWithTable creates a GetField expression with table name.
NewGreaterThan creates a new GreaterThan expression.
NewGreaterThanOrEqual creates a new GreaterThanOrEqual.
NewHashInTuple creates an InTuple expression.
NewIntDiv creates a new IntDiv 'div' sql.Expression.
NewInterval creates a new interval expression.
NewInTuple creates an InTuple expression.
NewIsFalse creates a new IsTrue expression with its boolean sense inverted (IsFalse, effectively).
NewIsNull creates a new IsNull expression.
NewIsTrue creates a new IsTrue expression.
NewLessThan creates a new LessThan expression.
NewLessThanOrEqual creates a LessThanOrEqual expression.
NewLike creates a new LIKE expression.
NewLiteral creates a new Literal expression.
NewMatchAgainst creates a new *MatchAgainst expression.
NewMinus creates a new Arithmetic - sql.Expression.
NewMod creates a new Mod sql.Expression.
NewMult creates a new Arithmetic * sql.Expression.
NewNamedLiteral returns a new NamedLiteral.
NewNot returns a new Not node.
NewNotInTuple creates a new NotInTuple expression.
NewNullSafeEquals returns a new NullSafeEquals expression.
NewOr creates a new Or expression.
NewPlus creates a new Arithmetic + sql.Expression.
NewProcedureParam creates a new ProcedureParam expression.
No description provided by the author
NewQualifiedStar returns a new star expression only for a specific table.
NewRangeFilterExpr builds an expression that filters with the list of sql ranges and exprs.
NewRegexp creates a new Regexp expression.
NewSetField creates a new SetField expression.
NewShiftLeft creates a new BitOp << sql.Expression.
NewShiftRight creates a new BitOp >> sql.Expression.
NewStar returns a new Star expression.
NewSystemVar creates a new SystemVar expression for the system variable named |name| with the specified |scope|.
NewTuple creates a new Tuple expression.
NewUnaryMinus creates a new UnaryMinus expression node.
NewUnresolvedColumn creates a new UnresolvedColumn expression.
NewUnresolvedFunction creates a new UnresolvedFunction expression.
NewUnresolvedProcedureParam creates a new UnresolvedProcedureParam expression.
NewUnresolvedQualifiedColumn creates a new UnresolvedColumn expression with a table qualifier.
NewUnresolvedTableFunction creates a new UnresolvedTableFunction node for a sql plan.
NewUserVar creates a UserVar with a name, but no type information, for use as the left-hand value in a SetField assignment Expression.
NewUserVarWithType creates a UserVar with its type resolved, so that it can be used as a value in other expressions.
NewXor creates a new Xor expression.
PreciseComparison searches an expression tree for comparison expressions that require a conversion or type promotion.
SchemaToGetFields takes a schema and returns an expression array of GetFields.
SplitConjunction breaks AND expressions into their left and right parts, recursively.
SplitDisjunction breaks OR expressions into their left and right parts, recursively.
WrapExpression takes in an expression and wraps it, returning the resulting Wrapper expression.
WrapExpressions takes in a number of expressions and wraps each one, returning the resulting slice.
# Constants
ConvertToBinary is a conversion to binary.
ConvertToChar is a conversion to char.
ConvertToDate is a conversion to date.
ConvertToDatetime is a conversion to datetime.
ConvertToDecimal is a conversion to decimal.
ConvertToDouble is a conversion to double.
ConvertToFloat is a conversion to float.
ConvertToJSON is a conversion to json.
ConvertToNChar is a conversion to nchar.
ConvertToReal is a conversion to double.
ConvertToSigned is a conversion to signed.
ConvertToTime is a conversion to time.
ConvertToUnsigned is a conversion to unsigned.
ConvertToYear isa convert to year.
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
# Variables
ErrAutoIncrementUnsupported is returned when table does not support AUTO_INCREMENT.
ErrConvertExpression is returned when a conversion is not possible.
ErrIndexOutOfBounds is returned when the field index is out of the bounds.
No description provided by the author
No description provided by the author
No description provided by the author
ErrNilOperand ir returned if some or both of the comparison's operands is nil.
ErrNoAutoIncrementCols is returned when table has no AUTO_INCREMENT columns.
ErrUnresolvedTableFunction is thrown when a table function cannot be resolved.
ErrUnsupportedInOperand is returned when there is an invalid righthand operand in an IN operator.
FetchEOF is a special EOF error that lets the loop implementation differentiate between this io.EOF.
# Structs
Alias is a node that gives a name to an expression.
AliasReference is a named reference to an aliased expression.
And checks whether two expressions are true.
Arithmetic expressions include plus, minus and multiplication (+, -, *) operations.
AutoIncrement implements AUTO_INCREMENT.
AutoUuid is an expression that captures an automatically generated UUID value and stores it in the session for later retrieval.
Between checks a value is between two given values.
The BINARY operator converts the expression to a binary string (a string that has the binary character set and binary collation).
BinaryExpressionStub is an expression that has two children.
No description provided by the author
BitOp expressions include BIT -AND, -OR and -XOR (&, | and ^) operations https://dev.mysql.com/doc/refman/8.0/en/bit-functions.html.
Case is an expression that returns the value of one of its branches when a condition is met.
CaseBranch is a single branch of a case expression.
CollatedExpression represents an expression (returning a string or byte slice) that carries a collation (which implicitly also carries a character set).
Convert represent a CAST(x AS T) or CONVERT(x, T) operation that casts x expression to type T.
ConvertUsing represents a CONVERT(X USING T) operation that casts the expression X to the character set T.
DefaultColumn is a default expression of a column that is not yet resolved.
No description provided by the author
Div expression represents "/" arithmetic operation.
Equals is a comparison that checks an expression is equal to another.
GetField is an expression to get the field of a table.
GreaterThan is a comparison that checks an expression is greater than another.
GreaterThanOrEqual is a comparison that checks an expression is greater or equal to another.
No description provided by the author
HashInTuple is an expression that checks an expression is inside a list of expressions using a hashmap.
IntDiv expression represents integer "div" arithmetic operation.
Interval defines a time duration.
InTuple is an expression that checks an expression is inside a list of expressions.
IsNull is an expression that checks if an expression is null.
IsTrue is an expression that checks if an expression is true.
LessThan is a comparison that checks an expression is less than another.
LessThanOrEqual is a comparison that checks an expression is equal or lower than another.
Like performs pattern matching against two strings.
LikeMatcher is a collation-supported matcher for LIKE expressions.
Literal represents a literal expression (string, number, bool, ...).
MatchAgainst reads from the tables that create a Full-Text index, and returns a relevancy for each row that is passed into it.
Mod expression represents "%" arithmetic operation.
NamedLiteral represents a literal value, but returns the name field rather than the value for String.
No description provided by the author
Not is a node that negates an expression.
NullSafeEquals is a comparison that checks an expression is equal to another, where NULLs do not coalesce to NULL and two NULLs compare equal to each other.
Or checks whether one of the two given expressions is true.
ProcedureParam represents the parameter of a stored procedure or stored function.
ProcedureReference contains the state for a single CALL statement of a stored procedure.
Regexp is a comparison that checks an expression matches a regexp.
SetField updates the value of a field or a system variable.
Sorter is a sorter implementation for Row slices using SortFields for the comparison.
Sorter2 is a version of Sorter that operates on Row2.
Star represents the selection of all available fields.
SystemVar is an expression that returns the value of a system variable.
TimeDelta is the difference between a time and another time.
TopRowsHeap implements heap.Interface based on Sorter.
UnaryExpression is an expression that has only one child.
UnaryMinus is an unary minus operator.
UnresolvedColumn is an expression of a column that is not yet resolved.
UnresolvedFunction represents a function that is not yet resolved.
UnresolvedProcedureParam represents an unresolved parameter of a stored procedure or stored function.
UnresolvedTableFunction represents a table function that is not yet resolved.
UserVar is an expression that returns the value of a user variable.
Wrapper simply acts as a wrapper for another expression.
Xor checks whether only one of the two given expressions is true.
# Interfaces
ArithmeticOp implements an arithmetic expression.
BinaryExpression is an expression that has two children.
Comparer implements a comparison expression.
ProcedureReferencable indicates that a sql.Node takes a *ProcedureReference returns a new copy with the reference set.
# Type aliases
No description provided by the author
No description provided by the author
Tuple is a fixed-size collection of expressions.