)',
'ON',
'WHERE',
+ '[\`\w]+ \s+ BETWEEN',
'GROUP \s+ BY',
'HAVING',
'ORDER \s+ BY',
}
# expression terminator keywords (as they start a new expression)
elsif (grep { $token =~ /^ $_ $/xi } @expression_terminator_sql_keywords ) {
- my $op = uc $token;
+ my $op = $token;
my $right = _recurse_parse($tokens, PARSE_IN_EXPR);
$left = $left ? [@$left, [$op => [$right] ]]
: [ [$op => [$right] ] ];
q/SELECT foo FROM bar WHERE a = 1 OR (b = 1 AND c = 1)/,
]
},
+ {
+ equal => 0,
+ statements => [
+ q/SELECT foo FROM bar WHERE ( completion_date BETWEEN ? AND ? AND status = ? )/,
+ q/SELECT foo FROM bar WHERE ( (completion_date BETWEEN ? AND ?) AND status = ? )/,
+ ]
+ },
# JOIN condition - equal
{