[Bast-commits] r9101 - DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI

caelum at dev.catalyst.perl.org caelum at dev.catalyst.perl.org
Wed Apr 7 17:23:53 GMT 2010


Author: caelum
Date: 2010-04-07 18:23:53 +0100 (Wed, 07 Apr 2010)
New Revision: 9101

Modified:
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/SQLAnywhere.pm
Log:
clean up UUID stringification for SQL Anywhere

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/SQLAnywhere.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/SQLAnywhere.pm	2010-04-07 05:06:54 UTC (rev 9100)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/SQLAnywhere.pm	2010-04-07 17:23:53 UTC (rev 9101)
@@ -80,20 +80,15 @@
   my $self = shift;
   my ($ident, $select) = @_;
 
-  my ($alias2source, $rs_alias) = $self->_resolve_ident_sources($ident);
+  my $col_info = $self->_resolve_column_info($ident);
 
   for my $select_idx (0..$#$select) {
     my $selected = $select->[$select_idx];
 
     next if ref $selected;
 
-    my ($alias, $col) = split /\./, $selected;
-       ($alias, $col) = ($rs_alias, $selected) if not defined $col;
+    my $data_type = $col_info->{$selected}{data_type};
 
-    my $data_type = eval {
-        $alias2source->{$alias}->column_info($col)->{data_type}
-    };
-
     if ($data_type && $data_type =~ /^uniqueidentifier\z/i) {
       $select->[$select_idx] = { UUIDTOSTR => $selected };
     }




More information about the Bast-commits mailing list