diff options
author | Michal Čihař <michal@cihar.com> | 2017-08-30 12:07:32 +0200 |
---|---|---|
committer | Michal Čihař <michal@cihar.com> | 2017-08-30 12:07:32 +0200 |
commit | 6ee6fa8e3b0df5b954b3156da5f75bf4ceb93f30 (patch) | |
tree | ea2974c011912b5bec3ffadc63e54fefd7743390 /src/Parser.php | |
parent | 1c1abcc7f311eb55ddeef4fed2d03119683ccc10 (diff) | |
download | sql-parser-6ee6fa8e3b0df5b954b3156da5f75bf4ceb93f30.zip sql-parser-6ee6fa8e3b0df5b954b3156da5f75bf4ceb93f30.tar.gz sql-parser-6ee6fa8e3b0df5b954b3156da5f75bf4ceb93f30.tar.bz2 |
Add support for MariaDB 10.3 INTERSECT and EXCEPT.
Fixes #166
Signed-off-by: Michal Čihař <michal@cihar.com>
Diffstat (limited to 'src/Parser.php')
-rw-r--r-- | src/Parser.php | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/Parser.php b/src/Parser.php index 9ef7deb..88451f0 100644 --- a/src/Parser.php +++ b/src/Parser.php @@ -110,6 +110,14 @@ class Parser extends Core 'field' => 'end_options', ), + 'INTERSECT' => array( + 'class' => 'PhpMyAdmin\\SqlParser\\Components\\UnionKeyword', + 'field' => 'union', + ), + 'EXCEPT' => array( + 'class' => 'PhpMyAdmin\\SqlParser\\Components\\UnionKeyword', + 'field' => 'union', + ), 'UNION' => array( 'class' => 'PhpMyAdmin\\SqlParser\\Components\\UnionKeyword', 'field' => 'union', @@ -427,7 +435,12 @@ class Parser extends Core continue; } - if (($token->keyword === 'UNION') || ($token->keyword === 'UNION ALL') || ($token->keyword === 'UNION DISTINCT')) { + if (($token->keyword === 'UNION') || + ($token->keyword === 'UNION ALL') || + ($token->keyword === 'UNION DISTINCT') || + ($token->keyword === 'EXCEPT') || + ($token->keyword === 'INTERSECT') + ) { $unionType = $token->keyword; continue; } |