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