# Packages
No description provided by the author
# Functions
Clone duplicates an existing sql.Expression, returning new nodes with the same structure and internal values.
No description provided by the author
ExpressionsResolve returns whether all the expressions in the slice given are resolved.
ExpressionToColumn converts the expression to the form that should be used in a Schema.
IsBinary returns whether the expression is binary or not.
IsUnary returns whether the expression is unary or not.
JoinAnd joins several expressions with And.
NewAlias returns a new Alias node.
NewAnd creates a new And expression.
NewArithmetic creates a new Arithmetic sql.Expression.
NewAutoIncrement creates a new AutoIncrement expression.
NewBetween creates a new Between expression.
No description provided by the author
No description provided by the author
NewBitAnd creates a new Arithmetic & sql.Expression.
NewBitOr creates a new Arithmetic | sql.Expression.
NewBitXor creates a new Arithmetic ^ sql.Expression.
NewCase returns an new Case expression.
NewConvert creates a new Convert expression.
NewDefaultColumn creates a new NewDefaultColumn expression.
No description provided by the author
NewDiv creates a new Arithmetic / 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.
No description provided by the author
NewIntDiv creates a new Arithmetic 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.
NewMinus creates a new Arithmetic - sql.Expression.
NewMod creates a new Arithmetic % sql.Expression.
NewMult creates a new Arithmetic * sql.Expression.
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.
NewRegexp creates a new Regexp expression.
NewSetField creates a new SetField expression.
NewShiftLeft creates a new Arithmetic << sql.Expression.
NewShiftRight creates a new Arithmetic >> sql.Expression.
NewStar returns a new Star expression.
NewSystemVar creates a new SystemVar expression.
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.
NewUnresolvedQualifiedColumn creates a new UnresolvedColumn expression with a table qualifier.
NewUserVar creates a new UserVar expression.
TransformUp applies a transformation function to the given expression from the bottom up.
TransformUpWithNode applies a transformation function to the given expression from the bottom up.
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.
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.
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
ErrNilOperand ir returned if some or both of the comparison's operands is nil.
ErrNoAutoIncrementCols is returned when table has no AUTO_INCREMENT columns.
ErrUnsupportedInOperand is returned when there is an invalid righthand operand in an IN operator.
# Structs
Alias is a node that gives a name to an expression.
And checks whether two expressions are true.
Arithmetic expressions (+, -, *, /, ...).
AutoIncrement implements AUTO_INCREMENT.
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).
BinaryExpression is an expression that has two children.
No description provided by the author
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.
Convert represent a CAST(x AS T) or CONVERT(x, T) operation that casts x expression to type T.
DefaultColumn is an default expression of a column that is not yet resolved.
No description provided by the author
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.
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.
Literal represents a literal expression (string, number, bool, ...).
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.
ProcedureParamReference contains the references to the parameters for a single CALL statement.
Regexp is a comparison that checks an expression matches a regexp.
SetField updates the value of a field or a system variable.
No description provided by the author
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.
UnaryExpression is an expression that has only one children.
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.
UserVar is an expression that returns the value of a user variable.
Wrapper simply acts as a wrapper for another expression.
# Interfaces
Comparer implements a comparison expression.
# Type aliases
TransformExprWithNodeFunc is a function that given an expression and the node that contains it, will return that expression as is or transformed along with an error, if any.
Tuple is a fixed-size collection of expressions.