X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI%2FADO%2FMS_Jet.pm;h=fbcd0eadc94eae9cabc4186b37b0e3d06ed4c111;hb=616ca57f8cd27f475da275bbef986fdd42d4069f;hp=438db4ea109b0d30e995f098b76c8cdf59b27e06;hpb=90d7422fc60a3bad71cc67dc20106ef68046664e;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/DBI/ADO/MS_Jet.pm b/lib/DBIx/Class/Storage/DBI/ADO/MS_Jet.pm index 438db4e..fbcd0ea 100644 --- a/lib/DBIx/Class/Storage/DBI/ADO/MS_Jet.pm +++ b/lib/DBIx/Class/Storage/DBI/ADO/MS_Jet.pm @@ -2,12 +2,16 @@ package DBIx::Class::Storage::DBI::ADO::MS_Jet; use strict; use warnings; + use base qw/ DBIx::Class::Storage::DBI::ADO DBIx::Class::Storage::DBI::ACCESS /; use mro 'c3'; -use DBIx::Class::Storage::DBI::ADO::MS_Jet::Cursor (); + +use DBIx::Class::Storage::DBI::ADO::CursorUtils '_normalize_guids'; +use DBIx::Class::ResultSource::FromSpec::Util 'fromspec_columns_info'; +use namespace::clean; __PACKAGE__->cursor_class('DBIx::Class::Storage::DBI::ADO::MS_Jet::Cursor'); @@ -103,22 +107,9 @@ sub select_single { return @row unless $self->cursor_class->isa('DBIx::Class::Storage::DBI::ADO::MS_Jet::Cursor'); - my $col_info = $self->_resolve_column_info($ident); - - for my $select_idx (0..$#$select) { - my $selected = $select->[$select_idx]; - - next if ref $selected; - - my $data_type = $col_info->{$selected}{data_type}; - - if ($self->_is_guid_type($data_type)) { - my $returned = $row[$select_idx]; + my $col_infos = fromspec_columns_info($ident); - $row[$select_idx] = substr($returned, 1, 36) - if substr($returned, 0, 1) eq '{'; - } - } + _normalize_guids($select, $col_infos, \@row, $self); return @row; } @@ -153,15 +144,19 @@ sub format_datetime { return $datetime_parser->format_datetime(shift); } -1; - -=head1 AUTHOR +=head1 FURTHER QUESTIONS? -See L and L. +Check the list of L. -=head1 LICENSE +=head1 COPYRIGHT AND LICENSE -You may distribute this code under the same terms as Perl itself. +This module is free software L +by the L. You can +redistribute it and/or modify it under the same terms as the +L. =cut + +1; + # vim:sts=2 sw=2: