my @sql_part = split /\?/, $sql;
my $new_sql;
- my ($alias2src, $rs_alias) = $self->_resolve_ident_sources($ident);
+ my $col_info = $self->_resolve_column_info($ident, [ map $_->[0], @$bind ]);
foreach my $bound (@$bind) {
my $col = shift @$bound;
- my $name_sep = $self->_sql_maker_opts->{name_sep} || '.';
-
- $col =~ s/^([^\Q${name_sep}\E]*)\Q${name_sep}\E//;
- my $alias = $1 || $rs_alias;
-
- my $rsrc = $alias2src->{$alias};
-
- my $datatype = $rsrc && $rsrc->column_info($col)->{data_type};
+ my $datatype = $col_info->{$col}{data_type};
foreach my $data (@$bound) {
$data = ''.$data if ref $data;
if (my $key = List::Util::first { $type =~ /$_/i } keys %noquote) {
return 0 if $noquote{$key}->($value);
- } elsif($self->is_datatype_numeric($type) && $number->($value)) {
+ } elsif ($self->is_datatype_numeric($type) && $number->($value)) {
return 0;
}