Skip to content

Commit fc390a8

Browse files
committed
Added support for SELECT * FROM dual;
1 parent 0a76734 commit fc390a8

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

src/Components/Expression.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,10 @@ public static function parse(Parser $parser, TokensList $list, array $options =
175175
continue;
176176
}
177177

178-
if (($token->type === Token::TYPE_KEYWORD) && ($token->flags & Token::FLAG_KEYWORD_RESERVED)) {
178+
if (($token->type === Token::TYPE_KEYWORD)
179+
&& ($token->flags & Token::FLAG_KEYWORD_RESERVED)
180+
&& ($token->value !== 'DUAL')
181+
) {
179182
// Keywords may be found only between brackets.
180183
if ($brackets === 0) {
181184
if ((empty($options['noAlias'])) && ($token->value === 'AS')) {

src/Components/ExpressionArray.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ public static function parse(Parser $parser, TokensList $list, array $options =
6767
continue;
6868
}
6969

70-
if (($token->type === Token::TYPE_KEYWORD) && ($token->flags & Token::FLAG_KEYWORD_RESERVED)) {
70+
if (($token->type === Token::TYPE_KEYWORD)
71+
&& ($token->flags & Token::FLAG_KEYWORD_RESERVED)
72+
&& ($token->value !== 'DUAL')
73+
) {
7174
// No keyword is expected.
7275
break;
7376
}

0 commit comments

Comments
 (0)