From: Prog Rammer Date: Mon, 27 Aug 2012 18:29:25 +0000 (-0500) Subject: test for count(*) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d83e5c27ca79e61311a63aadfe9c32ba7a676e65;p=dbsrgits%2FData-Query.git test for count(*) --- diff --git a/t/expr-helpers.t b/t/expr-helpers.t index 3bd489e..7b7137b 100644 --- a/t/expr-helpers.t +++ b/t/expr-helpers.t @@ -66,7 +66,6 @@ dq_sql_is ['SELECT * FROM foo GROUP BY x'], 'simple group by'; - dq_sql_is Select( [ Identifier('*') ], @@ -79,3 +78,11 @@ dq_sql_is ), ['SELECT * FROM foo LEFT OUTER JOIN bar ON foo.x = bar.y'], 'left outer join'; + +dq_sql_is + Select( + [ Operator({ 'SQL.Naive' => 'apply' }, [ Identifier('COUNT'), Identifier('*') ]) ], + Identifier('foo'), + ), + ['SELECT COUNT( * ) FROM foo'], + 'count';