[Bast-commits] r9445 -
DBIx-Class/0.08/branches/oracle_returning/t/sqlahacks
abraxxa at dev.catalyst.perl.org
abraxxa at dev.catalyst.perl.org
Wed May 26 16:25:14 GMT 2010
Author: abraxxa
Date: 2010-05-26 17:25:14 +0100 (Wed, 26 May 2010)
New Revision: 9445
Modified:
DBIx-Class/0.08/branches/oracle_returning/t/sqlahacks/oracle.t
Log:
added a test for SQLAHacks::Oracle returning multiple columns
Modified: DBIx-Class/0.08/branches/oracle_returning/t/sqlahacks/oracle.t
===================================================================
--- DBIx-Class/0.08/branches/oracle_returning/t/sqlahacks/oracle.t 2010-05-26 16:07:44 UTC (rev 9444)
+++ DBIx-Class/0.08/branches/oracle_returning/t/sqlahacks/oracle.t 2010-05-26 16:25:14 UTC (rev 9445)
@@ -26,9 +26,27 @@
$sql, \@bind,
q/INSERT INTO artist (name) VALUES (?) RETURNING artistid INTO :artistid/,
[ 'Testartist' ],
- 'sql_maker generates insert returning'
+ 'sql_maker generates insert returning for one column'
);
}
+{
+ my ($sql, @bind) = $sql_maker->insert(
+ 'computed_column_test',
+ {
+ 'a_timestamp' => '2010-05-26 18:22:00',
+ },
+ {
+ 'returning' => [ 'id', 'a_computed_column', 'charfield' ],
+ },
+ );
+
+ is_same_sql_bind(
+ $sql, \@bind,
+ q/INSERT INTO computed_column_test (a_timestamp) VALUES (?) RETURNING id, a_computed_column, charfield INTO :id, :a_computed_column, :charfield/,
+ [ '2010-05-26 18:22:00' ],
+ 'sql_maker generates insert returning for multiple columns'
+ );
+}
+
done_testing;
-
More information about the Bast-commits
mailing list