File Coverage

blib/lib/DBIx/Wrapper/Statement.pm
Criterion Covered Total %
statement 6 36 16.6
branch n/a
condition 0 3 0.0
subroutine 2 16 12.5
pod 0 6 0.0
total 8 61 13.1


line stmt bran cond sub pod time code
1             # -*-perl-*-
2             # Creation date: 2003-03-30 15:23:31
3             # Authors: Don
4             # Change log:
5             # $Revision: 1963 $
6              
7             # Copyright (c) 2003-2012 Don Owens
8             #
9             # All rights reserved. This program is free software; you can
10             # redistribute it and/or modify it under the same terms as Perl
11             # itself.
12              
13              
14 2     2   10 use strict;
  2         3  
  2         86  
15              
16             { package DBIx::Wrapper::Statement;
17              
18 2     2   10 use vars qw($VERSION);
  2         3  
  2         1201  
19             $VERSION = do { my @r=(q$Revision: 1963 $=~/\d+/g); sprintf "%d."."%02d"x$#r,@r };
20              
21             sub new {
22 0     0 0   my ($proto) = @_;
23 0   0       my $self = bless {}, ref($proto) || $proto;
24 0           return $self;
25             }
26              
27              
28             ####################
29             # getters/setters
30              
31             sub _getSth {
32 0     0     my ($self) = @_;
33 0           return $$self{_sth};
34             }
35              
36             sub _setSth {
37 0     0     my ($self, $sth) = @_;
38 0           $$self{_sth} = $sth;
39             }
40              
41             sub get_dbi_sth {
42 0     0 0   my ($self) = @_;
43 0           return $self->_getSth;
44             }
45              
46             # return the field names with their case modified as specified by setNameArg()
47             sub get_field_names {
48 0     0 0   my ($self) = @_;
49              
50 0           my $name_arg = $self->_getParent()->getNameArg;
51 0           return $self->_getSth()->{$name_arg};
52              
53             }
54             *getFieldNames = \&get_field_names;
55              
56             # return the field/column names from the driver with their case unmodified
57             sub get_names {
58 0     0 0   my ($self) = @_;
59              
60 0           return $self->_getSth()->{NAME};
61             }
62             *getNames = \&get_names;
63              
64             # return the field/column names in all uppercase
65             sub get_names_uc {
66 0     0 0   my ($self) = @_;
67              
68 0           return $self->_getSth()->{NAME_uc};
69             }
70             *getNamesUc = \&get_names_uc;
71              
72             # return the field/column names in all lowercase
73             sub get_names_lc {
74 0     0 0   my ($self) = @_;
75              
76 0           return $self->_getSth()->{NAME_uc};
77             }
78             *getNamesLc = \&get_names_lc;
79              
80             sub _getParent {
81 0     0     my ($self) = @_;
82 0           return $$self{_parent};
83             }
84              
85             sub _setParent {
86 0     0     my ($self, $parent) = @_;
87 0           $$self{_parent} = $parent;
88             }
89              
90             sub _getQuery {
91 0     0     my $self = shift;
92 0           return $self->{_query};
93             }
94              
95             sub _setQuery {
96 0     0     my $self = shift;
97 0           my $query = shift;
98 0           $self->{_query} = $query;
99             }
100              
101             sub _getRequestObj {
102 0     0     return shift()->{_request_obj};
103             }
104            
105             sub _setRequestObj {
106 0     0     my $self = shift;
107 0           $self->{_request_obj} = shift;
108             }
109            
110             }
111              
112             1;
113