From: Prog Rammer Date: Mon, 27 Aug 2012 20:14:53 +0000 (-0500) Subject: test for between X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1e55ce818fdf86cae62452653ae424da8a57d643;p=dbsrgits%2FData-Query.git test for between --- diff --git a/t/expr-helpers.t b/t/expr-helpers.t index 7b7137b..a64c9f3 100644 --- a/t/expr-helpers.t +++ b/t/expr-helpers.t @@ -86,3 +86,14 @@ dq_sql_is ), ['SELECT COUNT( * ) FROM foo'], 'count'; + +dq_sql_is + Where( + Operator({ 'SQL.Naive' => 'BETWEEN' }, [ + Identifier('x'), + map Literal('SQL', '?', [ binding($_) ]), (1,2), + ]), + Select([ Identifier('*') ], Identifier('foo')), + ), + [ 'SELECT * FROM foo WHERE ( x BETWEEN ? AND ? )', map binding($_), 1, 2, ], + 'between';