[Bast-commits] r9444 - 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:07:44 GMT 2010


Author: abraxxa
Date: 2010-05-26 17:07:44 +0100 (Wed, 26 May 2010)
New Revision: 9444

Added:
   DBIx-Class/0.08/branches/oracle_returning/t/sqlahacks/oracle.t
Log:
added first test for SQLAHacks::Oracle


Added: DBIx-Class/0.08/branches/oracle_returning/t/sqlahacks/oracle.t
===================================================================
--- DBIx-Class/0.08/branches/oracle_returning/t/sqlahacks/oracle.t	                        (rev 0)
+++ DBIx-Class/0.08/branches/oracle_returning/t/sqlahacks/oracle.t	2010-05-26 16:07:44 UTC (rev 9444)
@@ -0,0 +1,34 @@
+use strict;
+use warnings;
+
+use Test::More;
+
+use lib qw(t/lib);
+use DBIx::Class::SQLAHacks::Oracle;
+use DBICTest;
+use DBIC::SqlMakerTest;
+
+my $sql_maker = new DBIx::Class::SQLAHacks::Oracle;
+
+{
+  # my ($self, $table, $data, $options) = @_;
+  my ($sql, @bind) = $sql_maker->insert(
+    'artist',
+    {
+      'name' => 'Testartist',
+    },
+    {
+      'returning' => [ 'artistid' ],
+    },
+  );
+
+  is_same_sql_bind(
+    $sql, \@bind,
+    q/INSERT INTO artist (name) VALUES (?) RETURNING artistid INTO :artistid/,
+      [ 'Testartist' ],
+    'sql_maker generates insert returning'
+  );
+}
+
+done_testing;
+




More information about the Bast-commits mailing list