File Coverage

blib/lib/DBIx/Class/Storage/DBI/ADO/MS_Jet/Cursor.pm
Criterion Covered Total %
statement 18 26 69.2
branch n/a
condition 0 6 0.0
subroutine 6 8 75.0
pod 2 2 100.0
total 26 42 61.9


line stmt bran cond sub pod time code
1             package DBIx::Class::Storage::DBI::ADO::MS_Jet::Cursor;
2              
3 2     2   1428 use strict;
  2         4  
  2         59  
4 2     2   8 use warnings;
  2         2  
  2         60  
5 2     2   9 use base 'DBIx::Class::Storage::DBI::Cursor';
  2         4  
  2         561  
6 2     2   11 use mro 'c3';
  2         3  
  2         13  
7 2     2   58 use DBIx::Class::Storage::DBI::ADO::CursorUtils '_normalize_guids';
  2         3  
  2         105  
8 2     2   10 use namespace::clean;
  2         3  
  2         10  
9              
10             =head1 NAME
11              
12             DBIx::Class::Storage::DBI::ADO::MS_Jet::Cursor - GUID Support for MS Access over
13             ADO
14              
15             =head1 DESCRIPTION
16              
17             This class is for normalizing GUIDs retrieved from Microsoft Access over ADO.
18              
19             You probably don't want to be here, see
20             L for information on the Microsoft
21             Access driver.
22              
23             Unfortunately when using L, GUIDs come back wrapped in braces, the
24             purpose of this class is to remove them.
25             L sets
26             L to this class by default.
27             It is overridable via your
28             L.
29              
30             You can use L safely with this class and not lose
31             the GUID normalizing functionality,
32             L<::Cursor::Cached|DBIx::Class::Cursor::Cached> uses the underlying class data
33             for the inner cursor class.
34              
35             =cut
36              
37             sub next {
38 0     0 1   my $self = shift;
39              
40 0           my @row = $self->next::method(@_);
41              
42             _normalize_guids(
43             $self->args->[1],
44 0   0       $self->{_colinfos} ||= $self->storage->_resolve_column_info($self->args->[0]),
45             \@row,
46             $self->storage
47             );
48              
49 0           return @row;
50             }
51              
52             sub all {
53 0     0 1   my $self = shift;
54              
55 0           my @rows = $self->next::method(@_);
56              
57             _normalize_guids(
58             $self->args->[1],
59             $self->{_colinfos} ||= $self->storage->_resolve_column_info($self->args->[0]),
60             $_,
61             $self->storage
62 0   0       ) for @rows;
63              
64 0           return @rows;
65             }
66              
67             =head1 FURTHER QUESTIONS?
68              
69             Check the list of L.
70              
71             =head1 COPYRIGHT AND LICENSE
72              
73             This module is free software L
74             by the L. You can
75             redistribute it and/or modify it under the same terms as the
76             L.
77              
78             =cut
79              
80             1;
81              
82             # vim:sts=2 sw=2: