DBIx/Class/Storage/DBI/ADO/MS_Jet/Cursor.pm

filter: Statementstmt 70.3% 19 / 27 Branchbran n/a Conditioncond 0.0% 0 / 6 MC/DCmcdc 0.0% 0 / 4 Subroutinesub 75.0% 6 / 8 Podpod 100% 2 / 2 totaltotal 57.4% 27 / 47 CC 4 SCAR 15.9
CC
4
Cov
58%
all
12.0
next
6.0
BEGIN
1.0
CRAP 4.9
« DBIx/Class/Storage/DBI/ADO/Microsoft_SQL_Server/Cursor.pm ↑ Summary DBIx/Class/Storage/DBI/Sybase/FreeTDS.pm »
1 package DBIx::Class::Storage::DBI::ADO::MS_Jet::Cursor;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use base 'DBIx::Class::Storage::DBI::Cursor';
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use mro 'c3';
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 ▶use DBIx::Class::Storage::DBI::ADO::CursorUtils '_normalize_guids';
Subroutine BEGIN: called CC=1 SCAR=0.0
8 2 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
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<DBIx::Class::Storage::DBI::ACCESS> for information on the Microsoft
21 Access driver.
22  
23 Unfortunately when using L<DBD::ADO>, GUIDs come back wrapped in braces, the
24 purpose of this class is to remove them.
25 L<DBIx::Class::Storage::DBI::ADO::MS_Jet> sets
26 L<cursor_class|DBIx::Class::Storage::DBI/cursor_class> to this class by default.
27 It is overridable via your
28 L<connect_info|DBIx::Class::Storage::DBI/connect_info>.
29  
30 You can use L<DBIx::Class::Cursor::Cached> 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 0 ▶sub next {
Subroutine next: not called CC=2 SCAR=17.9
Pod documented
38 0 my $self = shift;
39  
40 0 my @row = $self->next::method(@_);
41  
42 _normalize_guids(
43 $self->args->[1],
44 0 ▶ $self->{_colinfos} ||= $self->storage->_resolve_column_info($self->args->[0]),
Condition0%0/3
$self->{"_colinfos"} ||= $self->storage->_resolve_column_info($self->args->[0])
l!l&&r!l&&!r
000
MC/DC0%0/2
$self->{"_colinfos"} ||= $self->storage->_resolve_column_info($self->args->[0])
$self->{"_colinfos"} $self->storage->_resolve_column_info($self->args->[0])
Truth table0%0/3
A ||= B
A= $self->{"_colinfos"}B= $self->storage->_resolve_column_info($self->args->[0])
ABresult
1X1
011
000
45 \@row,
46 $self->storage
47 );
48  
49 0 return @row;
50 }
51  
52 0 ▶sub all {
Subroutine all: not called CC=3 SCAR=24.8
Pod documented
53 0 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 ▶ ) for @rows;
Condition0%0/3
$self->{"_colinfos"} ||= $self->storage->_resolve_column_info($self->args->[0])
l!l&&r!l&&!r
000
MC/DC0%0/2
$self->{"_colinfos"} ||= $self->storage->_resolve_column_info($self->args->[0])
$self->{"_colinfos"} $self->storage->_resolve_column_info($self->args->[0])
Truth table0%0/3
A ||= B
A= $self->{"_colinfos"}B= $self->storage->_resolve_column_info($self->args->[0])
ABresult
1X1
011
000
63  
64 0 return @rows;
65 }
66  
67 =head1 FURTHER QUESTIONS?
68  
69 Check the list of L<additional DBIC resources|DBIx::Class/GETTING HELP/SUPPORT>.
70  
71 =head1 COPYRIGHT AND LICENSE
72  
73 This module is free software L<copyright|DBIx::Class/COPYRIGHT AND LICENSE>
74 by the L<DBIx::Class (DBIC) authors|DBIx::Class/AUTHORS>. You can
75 redistribute it and/or modify it under the same terms as the
76 L<DBIx::Class library|DBIx::Class/COPYRIGHT AND LICENSE>.
77  
78 =cut
79  
80 2 1;
81  
82 # vim:sts=2 sw=2:
« DBIx/Class/Storage/DBI/ADO/Microsoft_SQL_Server/Cursor.pm ↑ Summary DBIx/Class/Storage/DBI/Sybase/FreeTDS.pm »