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

# Packages

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.
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
No description provided by the author
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.
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
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.
NewExtract creates a new Extract 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
NewJSONArray creates a new JSONArray function.
NewJSONArrayAppend creates a new JSONArrayAppend function.
NewJSONArrayInsert creates a new JSONArrayInsert function.
NewJSONContains creates a new JSONContains function.
NewJSONContainsPath creates a new JSONContainsPath function.
NewJSONDepth creates a new JSONDepth function.
NewJSONExtract creates a new JSONExtract UDF.
NewJSONInsert creates a new JSONInsert function.
NewJSONKeys creates a new JSONKeys function.
NewJSONLength creates a new JSONLength function.
NewJSONMergePatch creates a new JSONMergePatch function.
NewJSONMergePreserve creates a new JSONMergePreserve function.
NewJSONObject creates a new JSONObject function.
NewJSONOverlaps creates a new JSONOverlaps function.
NewJSONPretty creates a new JSONPretty function.
NewJSONQuote creates a new JSONQuote function.
NewJSONRemove creates a new JSONRemove function.
NewJSONReplace creates a new JSONReplace function.
NewJSONSchemaValid creates a new JSONSchemaValid function.
NewJSONSchemaValidationReport creates a new JSONSchemaValidationReport function.
NewJSONSearch creates a new NewJSONSearch function.
NewJSONSet creates a new JSONSet function.
NewJSONStorageFree creates a new JSONStorageFree function.
NewJSONStorageSize creates a new JSONStorageSize function.
NewJSONTable creates a new JSONTable function.
NewJSONType creates a new JSONType function.
NewJSONUnquote creates a new JSONUnquote UDF.
NewJSONValid creates a new JSONValid function.
NewJSONValue creates a new JSONValue function.
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.
NewPad creates a new Pad expression.
NewPower creates a new Power expression.
NewRadians returns a new RADIANS function expression.
NewRand creates a new Rand expression.
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.
NewSqrt creates a new Sqrt expression.
NewStrCmp creates a new NewStrCmp UDF.
NewStrToDate constructs a new function expression from the given child expressions.
NewSubstring creates a new substring UDF.
NewSubstringIndex creates a new SubstringIndex UDF.
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.

# 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

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.
ErrUnsupportedJSONFunction is returned when a unsupported JSON function is called.
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
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.
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.
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
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
Extract 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
No description provided by the author
JSON_ARRAY_APPEND(json_doc, path, val[, path, val] ...) JSONArrayAppend Appends values to the end of the indicated arrays within a JSON document and returns the result.
JSON_ARRAY_INSERT(json_doc, path, val[, path, val] ...) JSONArrayInsert Updates a JSON document, inserting into an array within the document and returning the modified document.
JSON_CONTAINS(target, candidate[, path]) JSONContains indicates by returning 1 or 0 whether a given candidate JSON document is contained within a target JSON document, or, if a path argument was supplied, whether the candidate is found at a specific path within the target.
JSON_CONTAINS_PATH(json_doc, one_or_all, path[, path] ...) JSONContainsPath Returns 0 or 1 to indicate whether a JSON document contains data at a given path or paths.
JSON_DEPTH(json_doc) JSONDepth Returns the maximum depth of a JSON document.
JSON_EXTRACT(json_doc, path[, path] ...) JSONExtract extracts data from a json document using json paths.
JSON_INSERT(json_doc, path, val[, path, val] ...) JSONInsert Inserts data into a JSON document and returns the result.
JSON_KEYS(json_doc[, path]) JSONKeys Returns the keys from the top-level value of a JSON object as a JSON array, or, if a path argument is given, the top-level keys from the selected path.
JSON_LENGTH(json_doc[, path]) JSONLength Returns the length of a JSON document, or, if a path argument is given, the length of the value within the document identified by the path.
JSON_MERGE(json_doc, json_doc[, json_doc] ...) JSONMerge Merges two or more JSON documents.
JSON_MERGE_PATCH(json_doc, json_doc[, json_doc] ...) JSONMergePatch Performs an RFC 7396 compliant merge of two or more JSON documents and returns the merged result, without preserving members having duplicate keys.
No description provided by the author
JSONObject Evaluates a (possibly empty) list of key-value pairs and returns a JSON object containing those pairs.
JSON_OVERLAPS(json_doc1, json_doc2) JSONOverlaps Compares two JSON documents.
JSON_PRETTY(json_val) JSONPretty Provides pretty-printing of JSON values similar to that implemented in PHP and by other languages and database systems.
JSON_QUOTE(string) JSONQuote Quotes a string as a JSON value by wrapping it with double quote characters and escaping interior quote and other characters, then returning the result as a utf8mb4 string.
JSON_REMOVE(json_doc, path[, path] ...) JSONRemove Removes data from a JSON document and returns the result.
JSON_REPLACE(json_doc, path, val[, path, val] ...) JSONReplace Replaces existing values in a JSON document and returns the result.
JSON_SCHEMA_VALID(schema,document) JSONSchemaValid Validates a JSON document against a JSON schema.
JSON_SCHEMA_VALIDATION_REPORT(schema,document) JSONSchemaValidationReport Validates a JSON document against a JSON schema.
JSON_SEARCH(json_doc, one_or_all, search_str[, escape_char[, path] ...]) JSONSearch Returns the path to the given string within a JSON document.
JSON_SET(json_doc, path, val[, path, val] ...) JSONSet Inserts or updates data in a JSON document and returns the result.
JSON_STORAGE_FREE(json_val) JSONStorageFree For a JSON column value, this function shows how much storage space was freed in its binary representation after it was updated in place using JSON_SET(), JSON_REPLACE(), or JSON_REMOVE().
JSON_STORAGE_SIZE(json_val) JSONStorageSize This function returns the number of bytes used to store the binary representation of a JSON document.
JSON_TABLE(expr, path COLUMNS (column_list) [AS] alias) JSONTable Extracts data from a JSON document and returns it as a relational table having the specified columns.
JSON_TYPE(json_val) Returns a utf8mb4 string indicating the type of a JSON value.
JSONUnquote unquotes JSON value and returns the result as a utf8mb4 string.
JSON_VALID(val) Returns 0 or 1 to indicate whether a value is valid JSON.
JSON_VALUE(json_doc, path) JSONValue Extracts a value from a JSON document at the path given in the specified document, and returns the extracted value, optionally converting it to a desired type.
LastInsertId implements the LAST_INSERT_ID() 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.
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.
No description provided by the author
Rand returns a random float 0 <= x < 1.
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.
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.

# Type aliases

CountType is the kind of length count.
Registry is used to register functions.
Version is a function that returns server version.