[Bast-commits] r7121 - 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
Sat Jul 25 14:19:58 GMT 2009
Author: caelum
Date: 2009-07-25 14:19:58 +0000 (Sat, 25 Jul 2009)
New Revision: 7121
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:
use _resolve_column_info in 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-07-25 14:12:01 UTC (rev 7120)
+++ DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/NoBindVars.pm 2009-07-25 14:19:58 UTC (rev 7121)
@@ -49,20 +49,13 @@
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} || '.';
+ my $datatype = $col_info->{$col}{data_type};
- $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};
-
foreach my $data (@$bound) {
$data = ''.$data 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-07-25 14:12:01 UTC (rev 7120)
+++ DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase/NoBindVars.pm 2009-07-25 14:19:58 UTC (rev 7121)
@@ -39,7 +39,7 @@
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;
}
More information about the Bast-commits
mailing list