[Bast-commits] r9443 -
DBIx-Class/0.08/branches/oracle_returning/lib/DBIx/Class/SQLAHacks
abraxxa at dev.catalyst.perl.org
abraxxa at dev.catalyst.perl.org
Wed May 26 15:26:11 GMT 2010
Author: abraxxa
Date: 2010-05-26 16:26:11 +0100 (Wed, 26 May 2010)
New Revision: 9443
Modified:
DBIx-Class/0.08/branches/oracle_returning/lib/DBIx/Class/SQLAHacks/Oracle.pm
Log:
fixed Oracle insert returning syntax for multiple columns
Modified: DBIx-Class/0.08/branches/oracle_returning/lib/DBIx/Class/SQLAHacks/Oracle.pm
===================================================================
--- DBIx-Class/0.08/branches/oracle_returning/lib/DBIx/Class/SQLAHacks/Oracle.pm 2010-05-26 10:17:55 UTC (rev 9442)
+++ DBIx-Class/0.08/branches/oracle_returning/lib/DBIx/Class/SQLAHacks/Oracle.pm 2010-05-26 15:26:11 UTC (rev 9443)
@@ -16,7 +16,13 @@
SCALARREF => sub {$$fields},
});
- return join (' ', $self->_sqlcase(' returning'), $f, $self->_sqlcase('into'), ":$f");
+ my $bind_f = $self->_SWITCH_refkind($fields, {
+ ARRAYREF => sub {join ', ', map { $self->_quote(":$_") } @$fields;},
+ SCALAR => sub {$self->_quote(":$fields")},
+ SCALARREF => sub {":$$fields"},
+ });
+
+ return join (' ', $self->_sqlcase(' returning'), $f, $self->_sqlcase('into'), $bind_f);
}
1;
More information about the Bast-commits
mailing list