X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI%2FSybase%2FNoBindVars.pm;h=d0fea5e4ddc804f53e300ae35bb1857b1e4d97e3;hb=bbdc039bb73622702cbaaa25890349e3f2664fbf;hp=4ebb8cf5a624b6fe727e3f5350197f17659c1a8e;hpb=b88bf40aaa6a37f4d938c53319b724cdc0985351;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/lib/DBIx/Class/Storage/DBI/Sybase/NoBindVars.pm b/lib/DBIx/Class/Storage/DBI/Sybase/NoBindVars.pm index 4ebb8cf..d0fea5e 100644 --- a/lib/DBIx/Class/Storage/DBI/Sybase/NoBindVars.pm +++ b/lib/DBIx/Class/Storage/DBI/Sybase/NoBindVars.pm @@ -37,8 +37,13 @@ sub should_quote_data_type { return $self->next::method(@_) if not defined $value; + $type ||= ''; + if (my $key = List::Util::first { $type =~ /$_/i } keys %noquote) { return 0 if $noquote{$key}->($value); + } elsif (not $type) { +# try to guess based on value + return 0 if $number->($value) || $noquote->{money}->($value); } return $self->next::method(@_);