From: Peter Rabbitson Date: Sun, 22 Dec 2013 11:36:59 +0000 (+0100) Subject: Extra stopword (we need to find a way to introduce dialects...) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=81b3e5853d6a59c8bf28ff03c96985f74f8c6781;p=scpubgit%2FQ-Branch.git Extra stopword (we need to find a way to introduce dialects...) --- diff --git a/lib/SQL/Abstract/Tree.pm b/lib/SQL/Abstract/Tree.pm index f826ba7..519cae4 100644 --- a/lib/SQL/Abstract/Tree.pm +++ b/lib/SQL/Abstract/Tree.pm @@ -68,6 +68,7 @@ my @expression_start_keywords = ( 'HAVING', 'ORDER \s+ BY', 'SKIP', + 'FETCH', 'FIRST', 'LIMIT', 'OFFSET', diff --git a/t/10test.t b/t/10test.t index 736940c..23183a9 100644 --- a/t/10test.t +++ b/t/10test.t @@ -773,6 +773,14 @@ my @sql_tests = ( ) AND [source] = ? ) )', ], }, + { + equal => 1, + statements => [ + 'WHERE foo = ? FETCH FIRST 1 ROWS ONLY', + 'WHERE ( foo = ? ) FETCH FIRST 1 ROWS ONLY', + 'WHERE (( foo = ? )) FETCH FIRST 1 ROWS ONLY', + ], + }, ); my @bind_tests = (