duh
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Storage / DBI / NoBindVars.pm
index c5fa9af..7027ad6 100644 (file)
@@ -38,21 +38,30 @@ Manually subs in the values for the usual C<?> placeholders.
 
 sub _prep_for_execute {
   my $self = shift;
+
+  my ($op, $extra_bind, $ident) = @_;
+
   my ($sql, $bind) = $self->next::method(@_);
 
   # stringify args, quote via $dbh, and manually insert
 
+  my @sql_part = split /\?/, $sql;
+  my $new_sql;
+
   foreach my $bound (@$bind) {
-    shift @$bound;
+    my $col = shift @$bound;
+    my $datatype = 'FIXME!!!';
     foreach my $data (@$bound) {
         if(ref $data) {
             $data = ''.$data;
         }
-        $sql =~ s/\?/$self->_dbh->quote($data)/e;
+        $data = $self->_dbh->quote($data);
+        $new_sql .= shift(@sql_part) . $data;
     }
   }
+  $new_sql .= join '', @sql_part;
 
-  return ($sql);
+  return ($new_sql, []);
 }
 
 =head1 AUTHORS