[Bast-commits] r9005 - in DBIx-Class/0.08/trunk: . lib/DBIx/Class
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Mon Mar 15 13:55:14 GMT 2010
Author: ribasushi
Date: 2010-03-15 13:55:14 +0000 (Mon, 15 Mar 2010)
New Revision: 9005
Modified:
DBIx-Class/0.08/trunk/Makefile.PL
DBIx-Class/0.08/trunk/lib/DBIx/Class/SQLAHacks.pm
Log:
Proper fix for RETURNING with default insert
Modified: DBIx-Class/0.08/trunk/Makefile.PL
===================================================================
--- DBIx-Class/0.08/trunk/Makefile.PL 2010-03-15 12:46:21 UTC (rev 9004)
+++ DBIx-Class/0.08/trunk/Makefile.PL 2010-03-15 13:55:14 UTC (rev 9005)
@@ -45,7 +45,7 @@
'MRO::Compat' => '0.09',
'Module::Find' => '0.06',
'Path::Class' => '0.18',
- 'SQL::Abstract' => '1.61',
+ 'SQL::Abstract' => '1.62',
'SQL::Abstract::Limit' => '0.13',
'Sub::Name' => '0.04',
'Data::Dumper::Concise' => '1.000',
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/SQLAHacks.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/SQLAHacks.pm 2010-03-15 12:46:21 UTC (rev 9004)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/SQLAHacks.pm 2010-03-15 13:55:14 UTC (rev 9005)
@@ -362,9 +362,8 @@
if (! $_[0] or (ref $_[0] eq 'HASH' and !keys %{$_[0]} ) ) {
my $sql = "INSERT INTO ${table} DEFAULT VALUES";
- if (my @returning = @{ ($_[1]||{})->{returning} || [] }) {
- $sql .= ' RETURNING (' . (join ', ' => map $self->_quote($_), @returning)
- . ')';
+ if (my $ret = ($_[1]||{})->{returning} ) {
+ $sql .= $self->_insert_returning ($ret);
}
return $sql;
More information about the Bast-commits
mailing list