sub _rebless {
my $self = shift;
$self->disable_sth_caching(1);
- $self->_insert_txn(0);
+ $self->unsafe_insert(1); # there is nothing unsafe as the
+ # last_insert_id mechanism is different
+ # without bindvars
}
# this works when NOT using placeholders
numeric => $decimal,
);
-sub should_quote_value {
+sub interpolate_unquoted {
my $self = shift;
my ($type, $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);
- } elsif ($self->is_datatype_numeric($type) && $number->($value)) {
- return 0;
+ return 1 if $noquote{$key}->($value);
+ }
+ elsif ($self->is_datatype_numeric($type) && $number->($value)) {
+ return 1;
}
-
-## try to guess based on value
-# elsif (not $type) {
-# return 0 if $number->($value) || $noquote->{money}->($value);
-# }
return $self->next::method(@_);
}
-sub transform_unbound_value {
+sub _prep_interpolated_value {
my ($self, $type, $value) = @_;
if ($type =~ /money/i && defined $value) {
- $value =~ s/^\$//;
- $value = '$' . $value;
+ # change a ^ not followed by \$ to a \$
+ $value =~ s/^ (?! \$) /\$/x;
}
return $value;