[Bast-commits] r5796 - in SQL-Abstract/1.x/trunk: lib/SQL/Abstract t
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Sun Mar 22 22:12:17 GMT 2009
Author: ribasushi
Date: 2009-03-22 22:12:17 +0000 (Sun, 22 Mar 2009)
New Revision: 5796
Modified:
SQL-Abstract/1.x/trunk/lib/SQL/Abstract/Test.pm
SQL-Abstract/1.x/trunk/t/10test.t
Log:
Consider 'X BETWEEN' a statement keyword
Modified: SQL-Abstract/1.x/trunk/lib/SQL/Abstract/Test.pm
===================================================================
--- SQL-Abstract/1.x/trunk/lib/SQL/Abstract/Test.pm 2009-03-22 21:50:19 UTC (rev 5795)
+++ SQL-Abstract/1.x/trunk/lib/SQL/Abstract/Test.pm 2009-03-22 22:12:17 UTC (rev 5796)
@@ -38,6 +38,7 @@
)',
'ON',
'WHERE',
+ '[\`\w]+ \s+ BETWEEN',
'GROUP \s+ BY',
'HAVING',
'ORDER \s+ BY',
@@ -342,7 +343,7 @@
}
# 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] ] ];
Modified: SQL-Abstract/1.x/trunk/t/10test.t
===================================================================
--- SQL-Abstract/1.x/trunk/t/10test.t 2009-03-22 21:50:19 UTC (rev 5795)
+++ SQL-Abstract/1.x/trunk/t/10test.t 2009-03-22 22:12:17 UTC (rev 5796)
@@ -200,6 +200,13 @@
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
{
More information about the Bast-commits
mailing list