package
0.8.12
Repository: https://github.com/xsec-lab/go-mysql-server.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

NewArrayLength creates a new ArrayLength UDF.
NewCeil creates a new Ceil expression.
NewCharLength returns a new CHAR_LENGTH function.
NewCoalesce creates a new Coalesce sql.Expression.
NewConcat creates a new Concat UDF.
NewConcatWithSeparator creates a new NewConcatWithSeparator UDF.
NewConnectionID creates a new ConnectionID UDF node.
NewDatabase returns a new Database function.
NewDate returns a new Date node.
NewDateAdd creates a new date add function.
NewDateSub creates a new date add function.
NewDay creates a new Day UDF.
NewDayOfWeek creates a new DayOfWeek UDF.
NewDayOfYear creates a new DayOfYear UDF.
NewExplode creates a new Explode function.
NewFloor returns a new Floor expression.
NewFromBase64 creates a new FromBase64 expression.
NewGenerate creates a new Generate function.
NewGreatest creates a new Greatest UDF.
NewHour creates a new Hour UDF.
NewIfNull returns a new IFNULL UDF.
NewIsBinary creates a new IsBinary expression.
NewJSONExtract creates a new JSONExtract UDF.
NewJSONUnquote creates a new JSONUnquote UDF.
NewLeast creates a new Least UDF.
NewLength returns a new LENGTH function.
NewLog creates a new Log expression.
NewLogBase creates a new LogBase expression.
NewLogBaseFunc returns LogBase creator function with a specific base.
NewLower creates a new Lower expression.
NewMinute creates a new Minute UDF.
NewMonth creates a new Month UDF.
NewNow returns a new Now node.
NewNullIf returns a new NULLIF UDF.
NewPad creates a new Pad expression.
NewPadFunc returns a Pad creator function with a specific padType.
NewPower creates a new Power expression.
NewRegexpMatches creates a new RegexpMatches expression.
NewRepeat creates a new Repeat expression.
NewReplace creates a new Replace expression.
NewReverse creates a new Reverse expression.
NewRound returns a new Round expression.
NewSecond creates a new Second UDF.
NewSleep creates a new Sleep expression.
NewSoundex creates a new Soundex expression.
NewSplit creates a new Split UDF.
NewSqrt creates a new Sqrt expression.
NewSubstring creates a new substring UDF.
NewSubstringIndex creates a new SubstringIndex UDF.
NewToBase64 creates a new ToBase64 expression.
NewTrim creates a new Trim expression.
NewTrimFunc returns a Trim creator function with a specific trimType.
NewUpper creates a new Lower expression.
NewVersion creates a new Version UDF.
NewWeekday creates a new Weekday UDF.
NewYear creates a new Year UDF.
NewYearWeek creates a new YearWeek UDF.

# Constants

NumBytes counts the number of bytes in a string or binary content.
NumChars counts the number of characters in a string or binary content.

# Variables

Defaults is the function map with all the default functions.
ErrConcatArrayWithOthers is returned when there are more than 1 argument in concat and any of them is an array.
No description provided by the author
ErrInvalidArgumentForLogarithm is returned when an invalid argument value is passed to a logarithm function.
No description provided by the author
No description provided by the author
ErrUnsupportedType is returned when an argument to Greatest or Latest is not numeric or string.

# Structs

ArrayLength returns the length of an array.
Ceil returns the smallest integer value not less than X.
Coalesce returns the first non-NULL value in the list, or NULL if there are no non-NULL values.
Concat joins several strings together.
ConcatWithSeparator joins several strings together.
ConnectionID returns the current connection id.
Database stands for DATABASE() function.
Date a function takes the DATE part out from a datetime expression.
DateAdd adds an interval to a date.
DateSub subtracts an interval from a date.
Day is a function that returns the day of a date.
DayOfWeek is a function that returns the day of the week from a date where 1 = Sunday, ..., 7 = Saturday.
DayOfYear is a function that returns the day of the year from a date.
Explode is a function that generates a row for each value of its child.
Floor returns the biggest integer value not less than X.
FromBase64 is a function to decode a Base64-formatted string using the same dialect that MySQL's FROM_BASE64 uses.
Generate is a function that generates a row for each value of its child.
Greatest returns the argument with the greatest numerical or string value.
Hour is a function that returns the hour of a date.
IfNull function returns the specified value IF the expression is NULL, otherwise return the expression.
IsBinary is a function that returns whether a blob is binary or not.
JSONExtract extracts data from a json document using json paths.
JSONUnquote unquotes JSON value and returns the result as a utf8mb4 string.
Least returns the argument with the least numerical or string value.
Length returns the length of a string or binary content, either in bytes or characters.
Log is a function that returns the natural logarithm of a value.
LogBase is a function that returns the logarithm of a value with a specific base.
Lower is a function that returns the lowercase of the text provided.
Minute is a function that returns the minute of a date.
Month is a function that returns the month of a date.
Now is a function that returns the current time.
NullIf function compares two expressions and returns NULL if they are equal.
Pad is a function that pads a string with another string.
Power is a function that returns value of X raised to the power of Y.
RegexpMatches returns the matches of a regular expression.
Repeat is a function that returns the string repeated n times.
Replace is a function that returns a string with all occurrences of fromStr replaced by the string toStr.
Reverse is a function that returns the reverse of the text provided.
Round returns the number (x) with (d) requested decimal places.
Second is a function that returns the second of a date.
Sleep is a function that just waits for the specified number of seconds and returns 0.
Soundex is a function that returns the soundex of a string.
Split receives a string and returns the parts of it splitted by a delimiter.
Sqrt is a function that returns the square value of the number provided.
Substring is a function to return a part of a string.
SubstringIndex returns the substring from string str before count occurrences of the delimiter delim.
ToBase64 is a function to encode a string to the Base64 format using the same dialect that MySQL's TO_BASE64 uses.
Trim is a function that returns the string with prefix or suffix spaces removed based on the trimType.
Upper is a function that returns the UPPERCASE of the text provided.
Weekday is a function that returns the weekday of a date where 0 = Monday, ..., 6 = Sunday.
Year is a function that returns the year of a date.
YearWeek is a function that returns year and week for a date.

# Type aliases

CountType is the kind of length count.
Version is a function that returns server version.