[Bast-commits] r5453 - in SQL-Abstract/1.x/branches/1.50_RC: . t
norbi at dev.catalyst.perl.org
norbi at dev.catalyst.perl.org
Wed Feb 11 14:51:01 GMT 2009
Author: norbi
Date: 2009-02-11 14:51:00 +0000 (Wed, 11 Feb 2009)
New Revision: 5453
Modified:
SQL-Abstract/1.x/branches/1.50_RC/
SQL-Abstract/1.x/branches/1.50_RC/t/01generate.t
Log:
r5557 at vger: mendel | 2009-02-11 15:50:44 +0100
* Added test cases to test the arrayref (\[$sql, @bind]) support if @bind is empty.
Property changes on: SQL-Abstract/1.x/branches/1.50_RC
___________________________________________________________________
Name: svk:merge
- 4d5fae46-8e6a-4e08-abee-817e9fb894a2:/local/bast/SQL-Abstract/1.x/branches/1.50_RC:5539
4d5fae46-8e6a-4e08-abee-817e9fb894a2:/local/bast/SQL-Abstract/1.x/branches/1.50_RC-extraparens:5308
+ 4d5fae46-8e6a-4e08-abee-817e9fb894a2:/local/bast/SQL-Abstract/1.x/branches/1.50_RC:5557
4d5fae46-8e6a-4e08-abee-817e9fb894a2:/local/bast/SQL-Abstract/1.x/branches/1.50_RC-extraparens:5308
Modified: SQL-Abstract/1.x/branches/1.50_RC/t/01generate.t
===================================================================
--- SQL-Abstract/1.x/branches/1.50_RC/t/01generate.t 2009-02-11 14:45:23 UTC (rev 5452)
+++ SQL-Abstract/1.x/branches/1.50_RC/t/01generate.t 2009-02-11 14:51:00 UTC (rev 5453)
@@ -370,6 +370,38 @@
bind => [qw/1 2 3 4/, { answer => 42}],
warning_like => qr/HASH ref as bind value in insert is not supported/i,
},
+ #40
+ {
+ func => 'update',
+ args => ['test', {a => 1, b => \["42"]}, {a => {'between', [1,2]}}],
+ stmt => 'UPDATE test SET a = ?, b = 42 WHERE ( a BETWEEN ? AND ? )',
+ stmt_q => 'UPDATE `test` SET `a` = ?, `b` = 42 WHERE ( `a` BETWEEN ? AND ? )',
+ bind => [qw(1 1 2)],
+ },
+ #41
+ {
+ func => 'insert',
+ args => ['test', {a => 1, b => \["42"]}],
+ stmt => 'INSERT INTO test (a, b) VALUES (?, 42)',
+ stmt_q => 'INSERT INTO `test` (`a`, `b`) VALUES (?, 42)',
+ bind => [qw(1)],
+ },
+ #42
+ {
+ func => 'select',
+ args => ['test', '*', { a => \["= 42"], b => 1}],
+ stmt => q{SELECT * FROM test WHERE ( a = 42 ) AND (b = ? )},
+ stmt_q => q{SELECT * FROM `test` WHERE ( `a` = 42 ) AND ( `b` = ? )},
+ bind => [qw(1)],
+ },
+ #43
+ {
+ func => 'select',
+ args => ['test', '*', { a => {'<' => \["42"]}, b => 8 }],
+ stmt => 'SELECT * FROM test WHERE ( a < 42 AND b = ? )',
+ stmt_q => 'SELECT * FROM `test` WHERE ( `a` < 42 AND `b` = ? )',
+ bind => [qw(8)],
+ },
);
More information about the Bast-commits
mailing list