spelling fixes in the documaentation, sholud be gud now ;)
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Storage / DBI / MultiColumnIn.pm
index 050c018..3e85696 100644 (file)
@@ -4,6 +4,7 @@ use strict;
 use warnings;
 
 use base 'DBIx::Class::Storage::DBI';
+use mro 'c3';
 
 =head1 NAME 
 
@@ -16,7 +17,7 @@ in fact understand WHERE (cola, colb) IN ( SELECT subcol_a, subcol_b ... )
 The storage class for any such RDBMS should inherit from this class, in order
 to dramatically speed up update/delete operations on joined multipk resultsets.
 
-At this point the only overriden method is C<_multipk_update_delete()>
+At this point the only overridden method is C<_multipk_update_delete()>
 
 =cut
 
@@ -33,9 +34,10 @@ sub _multipk_update_delete {
     if ( ref $attrs->{select} ne 'ARRAY' or @{$attrs->{select}} != @pcols );
 
   # This is hideously ugly, but SQLA does not understand multicol IN expressions
+  my $sqla = $self->_sql_maker;
   my ($sql, @bind) = @${$rs->as_query};
-  $sql = sprintf ('(%s) IN %s',
-    join (', ', @pcols),
+  $sql = sprintf ('(%s) IN %s',   # the as_query stuff is already enclosed in ()s
+    join (', ', map { $sqla->_quote ($_) } @pcols),
     $sql,
   );