backport Ash's quoting fix from Loader to columns_info_for
Brandon L. Black [Thu, 29 Mar 2007 14:13:17 +0000 (14:13 +0000)]
lib/DBIx/Class/Storage/DBI.pm

index 27bd0d6..cee2436 100644 (file)
@@ -926,7 +926,7 @@ sub columns_info_for {
   }
 
   my %result;
-  my $sth = $dbh->prepare("SELECT * FROM $table WHERE 1=0");
+  my $sth = $dbh->prepare($self->sql_maker->select($table, undef, \'1 = 0'));
   $sth->execute;
   my @columns = @{$sth->{NAME_lc}};
   for my $i ( 0 .. $#columns ){