package
0.14.7
Repository: https://github.com/gabereiser/go-mysql-server.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

ConstructLikeMatcher returns a new LikeMatcher.
ContainsImpreciseComparison searches an expression tree for comparison expressions that require a conversion or type promotion.
No description provided by the author
ExpressionsResolve returns whether all the expressions in the slice given are resolved.
ExtractGetField returns the inner GetField expression from another expression.
GetCollationViaCoercion returns the collation and coercibility value that best represents the expression.
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.
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.
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.
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.
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.
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.
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.
ResolveCoercibility returns the collation to use by comparing coercibility, along with giving priority to binary collations.
SchemaToGetFields takes a schema and returns an expression array of GetFields.
SplitConjunction breaks AND 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.
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
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.

# 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.
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
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.
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.
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, ...).
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 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.
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.
Comparer implements a comparison expression.
ProcedureReferencable indicates that a sql.Node takes a *ProcedureReference returns a new copy with the reference set.

# Type aliases

ProcedureBlockExitError contains the scope height that should exit.
Tuple is a fixed-size collection of expressions.