[Bast-commits] r9446 -
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 16:40:29 GMT 2010
Author: abraxxa
Date: 2010-05-26 17:40:29 +0100 (Wed, 26 May 2010)
New Revision: 9446
Modified:
DBIx-Class/0.08/branches/oracle_returning/lib/DBIx/Class/SQLAHacks/Oracle.pm
Log:
added _generate_bind_param_name method to SQLAHacks::Oracle
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 16:25:14 UTC (rev 9445)
+++ DBIx-Class/0.08/branches/oracle_returning/lib/DBIx/Class/SQLAHacks/Oracle.pm 2010-05-26 16:40:29 UTC (rev 9446)
@@ -7,6 +7,13 @@
#
# Oracle has a different INSERT...RETURNING syntax
#
+
+sub _generate_bind_param_name {
+ my ($self, $colname) = @_;
+
+ return ":$colname";
+}
+
sub _insert_returning {
my ($self, $fields) = @_;
@@ -17,9 +24,9 @@
});
my $bind_f = $self->_SWITCH_refkind($fields, {
- ARRAYREF => sub {join ', ', map { $self->_quote(":$_") } @$fields;},
- SCALAR => sub {$self->_quote(":$fields")},
- SCALARREF => sub {":$$fields"},
+ ARRAYREF => sub {join ', ', map { $self->_generate_bind_param_name($_) } @$fields;},
+ SCALAR => sub {$self->_generate_bind_param_name($fields)},
+ SCALARREF => sub {$self->_generate_bind_param_name($$fields)},
});
return join (' ', $self->_sqlcase(' returning'), $f, $self->_sqlcase('into'), $bind_f);
More information about the Bast-commits
mailing list