[Bast-commits] r6599 - in
DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI: . Sybase
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Wed Jun 10 13:27:42 GMT 2009
Author: caelum
Date: 2009-06-10 13:27:41 +0000 (Wed, 10 Jun 2009)
New Revision: 6599
Modified:
DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/NoBindVars.pm
DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase/NoBindVars.pm
Log:
handle unknown rsrc in NoBindVars and Sybase::NoBindVars
Modified: DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/NoBindVars.pm
===================================================================
--- DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/NoBindVars.pm 2009-06-10 13:00:42 UTC (rev 6598)
+++ DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/NoBindVars.pm 2009-06-10 13:27:41 UTC (rev 6599)
@@ -62,7 +62,8 @@
my $rsrc = $alias2src->{$alias};
- my $datatype = $rsrc->column_info($col)->{data_type};
+ my $datatype = $rsrc ? $rsrc->column_info($col)->{data_type} :
+ '__UNKNOWN__';
foreach my $data (@$bound) {
if(ref $data) {
Modified: DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase/NoBindVars.pm
===================================================================
--- DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase/NoBindVars.pm 2009-06-10 13:00:42 UTC (rev 6598)
+++ DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase/NoBindVars.pm 2009-06-10 13:27:41 UTC (rev 6599)
@@ -39,6 +39,9 @@
if (my $key = List::Util::first { $type =~ /$_/i } keys %noquote) {
return 0 if $noquote{$key}->($value);
+ } elsif ($type eq '__UNKNOWN__') {
+# try to guess based on value
+ return 0 if $number->($value) || $noquote->{money}->($value);
}
return $self->next::method(@_);
More information about the Bast-commits
mailing list