# Packages
No description provided by the author
No description provided by the author
No description provided by the author
# Functions
CreateNewGetLock returns a new GetLock object.
No description provided by the author
IsFreeLockFunc is the function logic that is executed when the is_free_lock function is called.
IsUsedLockFunc is the function logic that is executed when the is_used_lock function is called.
NewAbsVal creates a new AbsVal expression.
NewAcos returns a new ACOS function expression.
NewAddDate returns a new function expression, or an error if one couldn't be created.
No description provided by the author
NewAsin returns a new ASIN function expression.
NewAtan returns a new ATAN function expression.
No description provided by the author
No description provided by the author
NewBitCount creates a new Ceil expression.
No description provided by the author
NewCeil creates a new Ceil expression.
No description provided by the author
NewCharLength returns a new CHAR_LENGTH function.
NewCoalesce creates a new Coalesce sql.Expression.
NewCoercibility creates a new Coercibility expression.
NewCollation creates a new Collation expression.
NewConcat creates a new Concat UDF.
NewConcatWithSeparator creates a new NewConcatWithSeparator UDF.
No description provided by the author
NewConv returns a new Conv expression.
NewConvertTz returns an implementation of the CONVERT_TZ() function.
NewCos returns a new COS function expression.
NewCot returns a new COT function expression.
NewCrc32 returns a new CRC32 function expression.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewDatabase returns a new Database function.
NewDate returns a new Date node.
NewDateAdd creates a new date add function.
NewDateDiff creates a new DATEDIFF() function.
NewDateFormat returns a new DateFormat UDF.
NewDateSub creates a new date add function.
NewDatetime returns a DatetimeConversion instance to handle the sql function "datetime".
NewDay creates a new Day UDF.
No description provided by the author
NewDayOfWeek creates a new DayOfWeek UDF.
NewDayOfYear creates a new DayOfYear UDF.
NewDegrees returns a new DEGREES function expression.
NewElt creates a new Elt UDF.
No description provided by the author
NewExtract creates a new Extract expression.
NewField creates a new Field UDF.
NewFindInSet creates a new FindInSet expression.
NewFloor returns a new Floor expression.
NewFormat returns a new Format expression.
No description provided by the author
NewFromBase64 creates a new FromBase64 expression.
No description provided by the author
NewGreatest creates a new Greatest UDF.
No description provided by the author
NewHour creates a new Hour UDF.
NewIf returns a new IF UDF.
NewIfNull returns a new IFNULL UDF.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewInstr creates a new instr UDF.
NewIsBinary creates a new IsBinary expression.
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
NewIsNull creates a new IsNull expression.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewLeast creates a new Least UDF.
NewLeft creates a new LEFT function.
No description provided by the author
No description provided by the author
NewLength returns a new LENGTH function.
NewLoadFile returns a LoadFile object for the LOAD_FILE() function.
NewLocate returns a new Locate 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.
NewMD5 returns a new MD5 function expression.
No description provided by the author
NewMinute creates a new Minute UDF.
NewMod returns a new MOD function expression.
NewMonth creates a new Month UDF.
No description provided by the author
NewNow returns a new Now node.
NewNullIf returns a new NULLIF UDF.
No description provided by the author
NewPad creates a new Pad expression.
No description provided by the author
NewPower creates a new Power expression.
NewQuarter creates a new Month UDF.
NewRadians returns a new RADIANS function expression.
NewRand creates a new Rand expression.
NewRandomBytes returns a new RANDOM_BYTES function.
NewRegexpLike creates a new RegexpLike expression.
NewRegexpReplace creates a new RegexpReplace expression.
NewRegistry creates a new Registry.
No description provided by the author
No description provided by the author
NewRepeat creates a new Repeat expression.
NewReplace creates a new Replace expression.
NewReverse creates a new Reverse expression.
NewRight creates a new RIGHT function.
No description provided by the author
No description provided by the author
NewRound returns a new Round expression.
No description provided by the author
NewSecond creates a new Second UDF.
NewSHA1 returns a new SHA1 function expression.
NewSHA2 returns a new SHA2 function expression.
NewSign returns a new SIGN function expression.
NewSin returns a new SIN function expression.
NewSleep creates a new Sleep expression.
NewSoundex creates a new Soundex expression.
No description provided by the author
NewSqrt creates a new Sqrt expression.
NewStrCmp creates a new NewStrCmp UDF.
NewStrToDate constructs a new function expression from the given child expressions.
NewSubDate returns a new function expression, or an error if one couldn't be created.
NewSubstring creates a new substring UDF.
NewSubstringIndex creates a new SubstringIndex UDF.
NewSysdate returns a new SYSDATE() function, using the supplied |args| for an optional value for fractional second precision.
NewTan returns a new TAN function expression.
NewTime returns a new Date node.
NewTimeDiff creates a new NewTimeDiff expression.
NewTimeFormat returns a new TimeFormat UDF.
No description provided by the author
NewTimestampDiff creates a new TIMESTAMPDIFF() function.
No description provided by the author
NewToBase64 creates a new ToBase64 expression.
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
NewUpper creates a new Lower expression.
No description provided by the author
NewUTCTimestamp returns a new UTCTimestamp node.
No description provided by the author
No description provided by the author
NewValues creates a new Values function.
NewVersion creates a new Version UDF.
NewWeek creates a new Week UDF.
NewWeekday creates a new Weekday UDF.
No description provided by the author
NewYear creates a new Year UDF.
NewYearWeek creates a new YearWeek UDF.
WithChildren implements the Expression interface.
ReleaseLockFunc is the function logic that is executed when the release_lock function is called.
SessionTimeZone returns a MySQL timezone offset string for the value of @@session_time_zone.
# Variables
BuiltIns is the set of built-in functions any integrator can use.
No description provided by the author
ErrFunctionAlreadyRegistered is thrown when a function is already registered.
ErrIllegalLockNameArgType is a kind of error that is thrown when the parameter passed as a lock name is not a string.
ErrInvalidArgumentForLogarithm is returned when an invalid argument value is passed to a logarithm function.
No description provided by the author
ErrTimeUnexpectedlyNil is thrown when a function encounters and unexpectedly nil time.
No description provided by the author
No description provided by the author
ErrUnknownType is thrown when a function encounters and unknown type.
ErrUnsupportedType is returned when an argument to Greatest or Latest is not numeric or string.
# Structs
AbsVal is a function that takes the absolute value of a number.
No description provided by the author
No description provided by the author
Ascii implements the sql function "ascii" which returns the numeric value of the leftmost character.
No description provided by the author
No description provided by the author
Bin implements the sql function "bin" which returns the binary representation of a number.
No description provided by the author
BitCount returns the smallest integer value not less than X.
Bitlength implements the sql function "bit_length" which returns the data length of the argument in bits.
Ceil returns the smallest integer value not less than X.
Char implements the sql function "char" which returns the character for each integer passed.
Coalesce returns the first non-NULL value in the list, or NULL if there are no non-NULL values.
Coercibility is a function that returns the coercibility of the inner expression.
Collation is a function that returns the collation of the inner expression.
Concat joins several strings together.
ConcatWithSeparator joins several strings together.
No description provided by the author
Conv function converts numbers between different number bases.
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
Database implements the DATABASE() function.
Date a function takes the DATE part out from a datetime expression.
DateAdd adds an interval to a date.
DateDiff returns expr1 − expr2 expressed as a value in days from one date to the other.
DateFormat function returns a string representation of the date specified in the format specified.
DateSub subtracts an interval from a date.
DatetimeConversion is a shorthand function for CONVERT(expr, DATETIME).
Day is a function that returns the day of a date.
DayName implements the DAYNAME function.
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.
No description provided by the author
Elt joins several strings together.
No description provided by the author
Extract takes out the specified unit(s) from the time expression.
Field joins several strings together.
FindInSet takes out the specified unit(s) from the time expression.
Floor returns the biggest integer value not less than X.
Format function returns a result of NumValue rounded to NumDecimalPlaces as a string.
FoundRows implements the FOUND_ROWS() function.
FromBase64 is a function to decode a Base64-formatted string using the same dialect that MySQL's FROM_BASE64 uses.
FromUnixtime converts the argument to a datetime.
GetLock is a SQL function implementing get_lock.
Greatest returns the argument with the greatest numerical or string value.
Hex implements the sql function "hex" which returns the hexadecimal representation of the string or numeric value.
Hour is a function that returns the hour of a date.
If function returns the second value if the first is true, the third value otherwise.
IfNull function returns the specified value IF the expression is NULL, otherwise return the expression.
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
IsBinary is a function that returns whether a blob is binary or not.
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
IsNull is a function that returns whether a value is null or not.
No description provided by the author
No description provided by the author
LastInsertId implements the LAST_INSERT_ID() function https://dev.mysql.com/doc/refman/8.0/en/information-functions.html#function_last-insert-id.
LastInsertUuid implements the LAST_INSERT_UUID() function.
Least returns the argument with the least numerical or string value.
Left is a function that returns the first N characters of a string expression.
No description provided by the author
Length returns the length of a string or binary content, either in bytes or characters.
No description provided by the author
Locate returns the position of the first occurrence of a substring in a string.
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.
MD5 function returns the MD5 hash of the input.
Microsecond implements the MICROSECOND function.
Minute is a function that returns the minute of a date.
Month is a function that returns the month of a date.
MonthName implements the MONTHNAME function.
NamedLockFunction is a sql function that takes just the name of a lock as an argument.
NoArgFunc is a helper type to reduce boilerplate in functions that take no arguments.
Now is a function that returns the current time.
NullIf function compares two expressions and returns NULL if they are equal.
Ord implements the sql function "ord" which returns the numeric value of the leftmost character.
Pad is a function that pads a string with another string.
No description provided by the author
Power is a function that returns value of X raised to the power of Y.
No description provided by the author
No description provided by the author
Rand returns a random float 0 <= x < 1.
RandomBytes returns a random binary string of the given length.
RegexpLike implements the REGEXP_LIKE function.
RegexpReplace implements the REGEXP_REPLACE function.
No description provided by the author
No description provided by the author
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.
Right is a function that returns the last N characters of a string expression.
No description provided by the author
Round returns the number (x) with (d) requested decimal places.
RowCount implements the ROW_COUNT() function.
Second is a function that returns the second of a date.
SHA1 function returns the SHA1 hash of the input.
SHA2 function returns the SHA-224/256/384/512 hash of the input.
No description provided by the author
Sin is the SIN function.
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.
Space implements the sql function "space" which returns a string with the number of spaces specified by the argument.
Sqrt is a function that returns the square value of the number provided.
StrCmp compares two strings.
StrToDate defines the built-in function STR_TO_DATE(str, format).
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.
No description provided by the author
Time is a function takes the Time part out from a datetime expression.
TimeDiff subtracts the second argument from the first expressed as a time value.
TimeFormat function returns a string representation of the date specified in the format specified.
TimestampConversion is a shorthand function for CONVERT(expr, TIMESTAMP).
TimestampDiff returns expr1 − expr2 expressed as a value in unit specified.
TimeToSec implements the time_to_sec function.
ToBase64 is a function to encode a string to the Base64 format using the same dialect that MySQL's TO_BASE64 uses.
No description provided by the author
UnaryDatetimeFunc is a sql.Function which takes a single datetime argument.
No description provided by the author
Unhex implements the sql function "unhex" which returns the integer representation of a hexadecimal string.
UnixTimestamp converts the argument to the number of seconds since 1970-01-01 00:00:00 UTC.
Upper is a function that returns the UPPERCASE of the text provided.
No description provided by the author
UTCTimestamp is a function that returns the current time.
No description provided by the author
No description provided by the author
Values is used in an ON DUPLICATE KEY UPDATE statement to return the value stated in the to-be-inserted column.
Week is a function that returns year and week for a date.
Weekday is a function that returns the weekday of a date where 0 = Monday, ..., 6 = Sunday.
WeekOfYear implements the weekofyear function.
Year is a function that returns the year of a date.
YearWeek is a function that returns year and week for a date.