sql-parser-cst
sql-parser-cst copied to clipboard
MySQL support (queries)
Data types
Basic syntax
- [ ] comment syntax differences
- [x] identifier syntax
- [x] unicode letters:
ähhää - [x] dollar sign as non-first character
foo$bar - [x] dollar sign as first character
$foo(though it generates a warning) - [x] can begin with a number
- [x] unicode letters:
- [x] String literals
- [x]
_charsetprefixes - [x] Natural charset strings
- [x] All backslash escape codes
- [x]
- [x] Interval literals
- [x] Number literals
- [x] Date/Time literals
- [x] Hex literals:
x'01af'syntax - [x] Hex literals:
0x01AFsyntax - [x] Bit literals:
b'01'syntax - [x] Bit literals:
0b01syntax - [x] Variables (using
@namesyntax) - [ ] ODBC syntax for date/time literals (e.g.
{ d 'str' }) - [ ] Executable comments (like
/*! STRAIGHT_JOIN */)
Expressions
- [x] Operators:
- [x] Concatenation of strings with space
- [x]
'foo' 'bar - [x]
'foo' "bar" - [x]
N'foo' 'bar' - [x]
_utf8 'foo' 'bar'
- [x]
- [x]
&&,||as equivalent toAND,OR - [x]
IS [NOT] {TRUE | FALSE} - [x]
IS [NOT] UNKNOWN - [x]
>=ANY | SOME | ALL - [x]
<=> - [x]
! - [x]
SOUNDS LIKE - [x]
COLLATE - [x]
BINARY - [x] MEMBER OF
- [x] JSON operators
- [x]
:=assignment operator - [x] Full text search
- [x] Precedence rules
- [x] Concatenation of strings with space
- [x]
ROW ( ... )expressions - [ ] Function calls:
- [ ] Built-in function name parsing
- [x] parenthesis-less function calls:
CURRENT_DATE,CURRENT_TIMESTAMP,CURRENT_TIME,CURRENT_USER,LOCALTIME,LOCALTIMESTAMP. - [x]
EXTRACT(... FROM ...)
Parameters
- [x]
?syntax.
Query syntax
- [x] Hints:
HIGH_PRIORITY,STRAIGHT_JOIN,SQL_SMALL_RESULT... - [x] Use of hints both before and after DISTINCT, like:
SELECT STRAIGHT_JOIN DISTINCT HIGH_PRIORITY - [x]
DISTINCTROW - [x]
INTO {OUTFILE | DUMPFILE | var} - [x]
GROUP BY ... WITH ROLLUP - [x]
ORDER BY ... WITH ROLLUP - [x]
FOR {UPDATE | SHARE}clause - [x]
LOCK IN SHARE MODE - [ ] FROM clause:
- [x]
PARTITIONselection - [x]
FROM DUAL - [x]
LATERAL - [x]
STRAIGHT_JOIN - [x] List of tables inside parens
tbl LEFT JOIN (tbl1, tbl2, tbl3) ON tbl.id=tbl1.id AND tbl1.id=tbl2.id - [x] Table alias with column list
- [ ] index hint list:
- [ ]
{USE | IGNORE | FORCE} {INDEX | KEY} - [ ]
[ FOR {JOIN | ORDER BY | GROUP BY} ] - [ ]
([index_name, ...])
- [ ]
- [ ] ODBC
{ OJ ... }syntax
- [x]
- [x] TABLE statements (shorthand for simple SELECT)
- [x] VALUES statements