You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 28, 2021. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+26-2Lines changed: 26 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,14 +50,21 @@ go get gopkg.in/src-d/go-mysql-server.v0
50
50
51
51
We are continuously adding more functionality to go-mysql-server. We support a subset of what is supported in MySQL, to see what is currently included check the [SUPPORTED](./SUPPORTED.md) file.
52
52
53
-
# Third-party clients
53
+
##Third-party clients
54
54
55
55
We support and actively test against certain third-party clients to ensure compatibility between them and go-mysql-server. You can check out the list of supported third party clients in the [SUPPORTED_CLIENTS](./SUPPORTED_CLIENTS.md) file along with some examples on how to connect to go-mysql-server using them.
56
56
57
57
## Custom functions
58
58
59
+
-`COUNT(expr)`: Returns a count of the number of non-NULL values of expr in the rows retrieved by a SELECT statement.
60
+
-`MIN(expr)`: Returns the minimum value of expr.
61
+
-`MAX(expr)`: Returns the maximum value of expr.
62
+
-`AVG(expr)`: Returns the average value of expr.
63
+
-`SUM(expr)`: Returns the sum of expr.
59
64
-`IS_BINARY(blob)`: Returns whether a BLOB is a binary file or not.
60
-
-`SUBSTRING(str, pos)`, `SUBSTRING(str, pos, len)`: Return a substring from the provided string.
65
+
-`SUBSTRING(str, pos)`, `SUBSTRING(str, pos, len)` : Return a substring from the provided string.
66
+
-`SUBSTR(str, pos)`, `SUBSTR(str, pos, len)` : Return a substring from the provided string.
67
+
-`MID(str, pos)`, `MID(str, pos, len)` : Return a substring from the provided string.
61
68
- Date and Timestamp functions: `YEAR(date)`, `MONTH(date)`, `DAY(date)`, `WEEKDAY(date)`, `HOUR(date)`, `MINUTE(date)`, `SECOND(date)`, `DAYOFWEEK(date)`, `DAYOFYEAR(date)`.
62
69
-`ARRAY_LENGTH(json)`: If the json representation is an array, this function returns its size.
63
70
-`SPLIT(str,sep)`: Receives a string and a separator and returns the parts of the string split by the separator as a JSON array of strings.
@@ -70,6 +77,23 @@ We support and actively test against certain third-party clients to ensure compa
70
77
-`ROUND(number, decimals)`: Round the `number` to `decimals` decimal places.
71
78
-`CONNECTION_ID()`: Return the current connection ID.
72
79
-`SOUNDEX(str)`: Returns the soundex of a string.
80
+
-`JSON_EXTRACT(json_doc, path, ...)`: Extracts data from a json document using json paths.
81
+
-`LN(X)`: Return the natural logarithm of X.
82
+
-`LOG2(X)`: Returns the base-2 logarithm of X.
83
+
-`LOG10(X)`: Returns the base-10 logarithm of X.
84
+
-`LOG(X), LOG(B, X)`: If called with one parameter, this function returns the natural logarithm of X. If called with two parameters, this function returns the logarithm of X to the base B. If X is less than or equal to 0, or if B is less than or equal to 1, then NULL is returned.
85
+
-`RPAD(str, len, padstr)`: Returns the string str, right-padded with the string padstr to a length of len characters.
86
+
-`LPAD(str, len, padstr)`: Return the string argument, left-padded with the specified string.
87
+
-`SQRT(X)`: Returns the square root of a nonnegative number X.
88
+
-`POW(X, Y)`, `POWER(X, Y)`: Returns the value of X raised to the power of Y.
89
+
-`TRIM(str)`: Returns the string str with all spaces removed.
90
+
-`LTRIM(str)`: Returns the string str with leading space characters removed.
91
+
-`RTRIM(str)`: Returns the string str with trailing space characters removed.
92
+
-`REVERSE(str)`: Returns the string str with the order of the characters reversed.
93
+
-`REPEAT(str, count)`: Returns a string consisting of the string str repeated count times.
94
+
-`REPLACE(str,from_str,to_str)`: Returns the string str with all occurrences of the string from_str replaced by the string to_str.
95
+
-`IFNULL(expr1, expr2)`: If expr1 is not NULL, IFNULL() returns expr1; otherwise it returns expr2.
96
+
-`NULLIF(expr1, expr2)`: Returns NULL if expr1 = expr2 is true, otherwise returns expr1.
0 commit comments