|
1 | 1 | Asterisks (*) denote expressions not natively from MySQL.
|
2 | 2 |
|
3 | 3 | + Aggregate
|
4 |
| - + `avg(number|bigint|null)` |
5 |
| - https://dev.mysql.com/doc/refman/8.0/en/aggregate-functions.html#function_avg |
6 |
| - + `count()` |
7 |
| - https://dev.mysql.com/doc/refman/8.0/en/aggregate-functions.html#function_count |
8 |
| - + `max(bigint|number|string|boolean|Date|Buffer|null)` |
9 |
| - https://dev.mysql.com/doc/refman/8.0/en/aggregate-functions.html#function_max |
10 |
| - + `min(bigint|number|string|boolean|Date|Buffer|null)` |
11 |
| - https://dev.mysql.com/doc/refman/8.0/en/aggregate-functions.html#function_min |
12 |
| - + `(number|null)`/`bigIntSum(bigint|null)` |
13 |
| - https://dev.mysql.com/doc/refman/8.0/en/aggregate-functions.html#function_sum |
| 4 | + + [`avg(number|bigint|null)`](https://dev.mysql.com/doc/refman/8.0/en/aggregate-functions.html#function_avg) |
| 5 | + + [`count()`](https://dev.mysql.com/doc/refman/8.0/en/aggregate-functions.html#function_count) |
| 6 | + + [`max(expr)`](https://dev.mysql.com/doc/refman/8.0/en/aggregate-functions.html#function_max) |
| 7 | + + [`min(expr)`](https://dev.mysql.com/doc/refman/8.0/en/aggregate-functions.html#function_min) |
| 8 | + + [`(number|null)`/`bigIntSum(bigint|null)`](https://dev.mysql.com/doc/refman/8.0/en/aggregate-functions.html#function_sum) |
14 | 9 | + [`sumAsDecimal(number|null, { maxDigitCount, fractionalDigitCount })`*](sum-as-decimal.md)
|
| 10 | + |
15 | 11 | + Cast
|
16 |
| - + CAST( AS DATETIME) |
17 |
| - + CAST( AS DOUBLE) |
18 |
| - + CAST( AS SIGNED INTEGER) |
19 |
| - + CAST( AS UNSIGNED INTEGER) |
| 12 | + + [`castAsDateTime(Date|string, 0|1|2|3)`](https://dev.mysql.com/doc/refman/8.0/en/cast-functions.html#function_cast) |
| 13 | + + `castAsDouble(bigint)*` |
| 14 | + |
| 15 | + MySQL 5.7 does not have `CAST(x AS DOUBLE)`. |
| 16 | + However, `(x + 0e0)` has the same effect. |
| 17 | + |
| 18 | + + [`castAsSignedInteger(number|bigint)`](https://dev.mysql.com/doc/refman/8.0/en/cast-functions.html#function_cast) |
| 19 | + + [`castAsUnsignedInteger(number|bigint)`](https://dev.mysql.com/doc/refman/8.0/en/cast-functions.html#function_cast) |
| 20 | + |
20 | 21 | + Comparison
|
21 |
| - + STR_CMP |
22 |
| - + COALESCE |
23 |
| - + GREATEST |
24 |
| - + INTERVAL |
25 |
| - + LEASE |
26 |
| - + LIKE |
27 |
| - + BETWEEN |
28 |
| - + COMPARISON |
29 |
| - + EQ |
30 |
| - + GT |
31 |
| - + GTEQ |
32 |
| - + IN |
33 |
| - + IS FALSE |
34 |
| - + IS NOT FALSE |
35 |
| - + IS NOT NULL |
36 |
| - + IS NOT TRUE |
37 |
| - + IS NULL |
38 |
| - + IS TRUE |
39 |
| - + LT |
40 |
| - + LTEQ |
41 |
| - + NOT BETWEEN |
42 |
| - + NOT EQ |
43 |
| - + NOT IN |
44 |
| - + NULL SAFE EQ |
45 |
| - + NULL SAFE NOT EQ |
46 |
| - + |
| 22 | + + [`strCmp(string, string)`](https://dev.mysql.com/doc/refman/8.0/en/string-comparison-functions.html#function_strcmp) |
| 23 | + + [`coalesce(expr, ...)`](https://dev.mysql.com/doc/refman/8.0/en/comparison-operators.html#function_coalesce) |
| 24 | + + [`greatest(expr, expr, ...)`](https://dev.mysql.com/doc/refman/8.0/en/comparison-operators.html#function_greatest) |
| 25 | + + [`interval(number|bigint, number|bigint, ...)`](https://dev.mysql.com/doc/refman/8.0/en/comparison-operators.html#function_interval) |
| 26 | + + [`least(expr, expr, ...)`](https://dev.mysql.com/doc/refman/8.0/en/comparison-operators.html#function_least) |
| 27 | + + [`like(string, string)`](https://dev.mysql.com/doc/refman/8.0/en/string-comparison-functions.html#operator_like) |
| 28 | + + [`between(expr, expr, expr)`](https://dev.mysql.com/doc/refman/8.0/en/comparison-operators.html#operator_between) |
| 29 | + + [`eq(expr, expr)`](https://dev.mysql.com/doc/refman/8.0/en/comparison-operators.html#operator_equal) |
| 30 | + + [`gt(expr, expr)`](https://dev.mysql.com/doc/refman/8.0/en/comparison-operators.html#operator_greater-than) |
| 31 | + + [`gtEq(expr, expr)`](https://dev.mysql.com/doc/refman/8.0/en/comparison-operators.html#operator_greater-than-or-equal) |
| 32 | + + [`in(expr, ...)`](https://dev.mysql.com/doc/refman/8.0/en/comparison-operators.html#function_in) |
| 33 | + + [`isFalse(expr)`](https://dev.mysql.com/doc/refman/8.0/en/comparison-operators.html#operator_is) |
| 34 | + + [`isNotFalse(expr)`](https://dev.mysql.com/doc/refman/8.0/en/comparison-operators.html#operator_is-not) |
| 35 | + + [`isNotNull(expr)`](https://dev.mysql.com/doc/refman/8.0/en/comparison-operators.html#operator_is-not-null) |
| 36 | + + [`isNotTrue(expr)`](https://dev.mysql.com/doc/refman/8.0/en/comparison-operators.html#operator_is-not) |
| 37 | + + [`isNull(expr)`](https://dev.mysql.com/doc/refman/8.0/en/comparison-operators.html#operator_is-null) |
| 38 | + + [`isTrue(expr)`](https://dev.mysql.com/doc/refman/8.0/en/comparison-operators.html#operator_is) |
| 39 | + + [`lt(expr)`](https://dev.mysql.com/doc/refman/8.0/en/comparison-operators.html#operator_less-than) |
| 40 | + + [`ltEq(expr)`](https://dev.mysql.com/doc/refman/8.0/en/comparison-operators.html#operator_less-than-or-equal) |
| 41 | + + [`notBetween(expr, expr, expr)`](https://dev.mysql.com/doc/refman/8.0/en/comparison-operators.html#operator_not-between) |
| 42 | + + [`notEq(expr, expr)` (in MySQL, both `<>` and `!=` are valid)](https://dev.mysql.com/doc/refman/8.0/en/comparison-operators.html#operator_not-equal) |
| 43 | + + [`notIn(expr, ...)`](https://dev.mysql.com/doc/refman/8.0/en/comparison-operators.html#function_not-in) |
| 44 | + + [`nullSafeEq(expr, expr)`](https://dev.mysql.com/doc/refman/8.0/en/comparison-operators.html#operator_equal-to) |
| 45 | + + [`nullSafeNotEq(expr, expr)`*] |
| 46 | + |
| 47 | + Internally, `NOT (a <=> b)` |
| 48 | + |
47 | 49 | + Control-flow
|
48 | 50 | + IF
|
49 | 51 | + CASE
|
|
0 commit comments