| 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 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 15 | |||||||||||||||||||||
| 16 | { package DBIx::Wrapper::Statement; | ||||||||||||||||||||
| 17 | |||||||||||||||||||||
| 18 | 2 | ▶ | use vars qw($VERSION); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 19 | 2 | $VERSION = do { my @r=(q$Revision: 1963 $=~/\d+/g); sprintf "%d."."%02d"x$#r,@r }; | |||||||||||||||||||
| 20 | |||||||||||||||||||||
| 21 | 0 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 22 | 0 | my ($proto) = @_; | |||||||||||||||||||
| 23 | 0 | ▶ | my $self = bless {}, ref($proto) || $proto; | ||||||||||||||||||
|
Condition0%0/3
ref $proto || $proto
MC/DC0%0/2
ref $proto || $proto
ref $proto
$proto
Truth table0%0/3
A || B
A= ref $protoB= $proto
| |||||||||||||||||||||
| 24 | 0 | return $self; | |||||||||||||||||||
| 25 | } | ||||||||||||||||||||
| 26 | |||||||||||||||||||||
| 27 | |||||||||||||||||||||
| 28 | #################### | ||||||||||||||||||||
| 29 | # getters/setters | ||||||||||||||||||||
| 30 | |||||||||||||||||||||
| 31 | 0 | ▶ | sub _getSth { | ||||||||||||||||||
|
Subroutine
_getSth: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 32 | 0 | my ($self) = @_; | |||||||||||||||||||
| 33 | 0 | return $$self{_sth}; | |||||||||||||||||||
| 34 | } | ||||||||||||||||||||
| 35 | |||||||||||||||||||||
| 36 | 0 | ▶ | sub _setSth { | ||||||||||||||||||
|
Subroutine
_setSth: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 37 | 0 | my ($self, $sth) = @_; | |||||||||||||||||||
| 38 | 0 | $$self{_sth} = $sth; | |||||||||||||||||||
| 39 | } | ||||||||||||||||||||
| 40 | |||||||||||||||||||||
| 41 | 0 | ▶ | sub get_dbi_sth { | ||||||||||||||||||
|
Subroutine
get_dbi_sth: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 42 | 0 | my ($self) = @_; | |||||||||||||||||||
| 43 | 0 | return $self->_getSth; | |||||||||||||||||||
| 44 | } | ||||||||||||||||||||
| 45 | |||||||||||||||||||||
| 46 | # return the field names with their case modified as specified by setNameArg() | ||||||||||||||||||||
| 47 | 0 | ▶ | sub get_field_names { | ||||||||||||||||||
|
Subroutine
get_field_names: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 48 | 0 | my ($self) = @_; | |||||||||||||||||||
| 49 | |||||||||||||||||||||
| 50 | 0 | my $name_arg = $self->_getParent()->getNameArg; | |||||||||||||||||||
| 51 | 0 | return $self->_getSth()->{$name_arg}; | |||||||||||||||||||
| 52 | |||||||||||||||||||||
| 53 | } | ||||||||||||||||||||
| 54 | 2 | *getFieldNames = \&get_field_names; | |||||||||||||||||||
| 55 | |||||||||||||||||||||
| 56 | # return the field/column names from the driver with their case unmodified | ||||||||||||||||||||
| 57 | 0 | ▶ | sub get_names { | ||||||||||||||||||
|
Subroutine
get_names: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 58 | 0 | my ($self) = @_; | |||||||||||||||||||
| 59 | |||||||||||||||||||||
| 60 | 0 | return $self->_getSth()->{NAME}; | |||||||||||||||||||
| 61 | } | ||||||||||||||||||||
| 62 | 2 | *getNames = \&get_names; | |||||||||||||||||||
| 63 | |||||||||||||||||||||
| 64 | # return the field/column names in all uppercase | ||||||||||||||||||||
| 65 | 0 | ▶ | sub get_names_uc { | ||||||||||||||||||
|
Subroutine
get_names_uc: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 66 | 0 | my ($self) = @_; | |||||||||||||||||||
| 67 | |||||||||||||||||||||
| 68 | 0 | return $self->_getSth()->{NAME_uc}; | |||||||||||||||||||
| 69 | } | ||||||||||||||||||||
| 70 | 2 | *getNamesUc = \&get_names_uc; | |||||||||||||||||||
| 71 | |||||||||||||||||||||
| 72 | # return the field/column names in all lowercase | ||||||||||||||||||||
| 73 | 0 | ▶ | sub get_names_lc { | ||||||||||||||||||
|
Subroutine
get_names_lc: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 74 | 0 | my ($self) = @_; | |||||||||||||||||||
| 75 | |||||||||||||||||||||
| 76 | 0 | return $self->_getSth()->{NAME_uc}; | |||||||||||||||||||
| 77 | } | ||||||||||||||||||||
| 78 | 2 | *getNamesLc = \&get_names_lc; | |||||||||||||||||||
| 79 | |||||||||||||||||||||
| 80 | 0 | ▶ | sub _getParent { | ||||||||||||||||||
|
Subroutine
_getParent: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 81 | 0 | my ($self) = @_; | |||||||||||||||||||
| 82 | 0 | return $$self{_parent}; | |||||||||||||||||||
| 83 | } | ||||||||||||||||||||
| 84 | |||||||||||||||||||||
| 85 | 0 | ▶ | sub _setParent { | ||||||||||||||||||
|
Subroutine
_setParent: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 86 | 0 | my ($self, $parent) = @_; | |||||||||||||||||||
| 87 | 0 | $$self{_parent} = $parent; | |||||||||||||||||||
| 88 | } | ||||||||||||||||||||
| 89 | |||||||||||||||||||||
| 90 | 0 | ▶ | sub _getQuery { | ||||||||||||||||||
|
Subroutine
_getQuery: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 91 | 0 | my $self = shift; | |||||||||||||||||||
| 92 | 0 | return $self->{_query}; | |||||||||||||||||||
| 93 | } | ||||||||||||||||||||
| 94 | |||||||||||||||||||||
| 95 | 0 | ▶ | sub _setQuery { | ||||||||||||||||||
|
Subroutine
_setQuery: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 96 | 0 | my $self = shift; | |||||||||||||||||||
| 97 | 0 | my $query = shift; | |||||||||||||||||||
| 98 | 0 | $self->{_query} = $query; | |||||||||||||||||||
| 99 | } | ||||||||||||||||||||
| 100 | |||||||||||||||||||||
| 101 | 0 | ▶ | sub _getRequestObj { | ||||||||||||||||||
|
Subroutine
_getRequestObj: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 102 | 0 | return shift()->{_request_obj}; | |||||||||||||||||||
| 103 | } | ||||||||||||||||||||
| 104 | |||||||||||||||||||||
| 105 | 0 | ▶ | sub _setRequestObj { | ||||||||||||||||||
|
Subroutine
_setRequestObj: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 106 | 0 | my $self = shift; | |||||||||||||||||||
| 107 | 0 | $self->{_request_obj} = shift; | |||||||||||||||||||
| 108 | } | ||||||||||||||||||||
| 109 | |||||||||||||||||||||
| 110 | } | ||||||||||||||||||||
| 111 | |||||||||||||||||||||
| 112 | 2 | 1; | |||||||||||||||||||
| 113 | |||||||||||||||||||||