| 1 | package DBomb::Query::Text; | ||||||||||
| 2 | |||||||||||
| 3 | =head1 NAME | ||||||||||
| 4 | |||||||||||
| 5 | DBomb::Query::Text - Just a wrapper around plain sql. | ||||||||||
| 6 | |||||||||||
| 7 | =cut | ||||||||||
| 8 | |||||||||||
| 9 | 12 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 12 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | 12 | our $VERSION = '$Revision: 1.6 $'; | |||||||||
| 12 | |||||||||||
| 13 | 12 | ▶ | use Carp::Assert; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 14 | 12 | ▶ | use DBomb::Util qw(ctx_0); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 15 | use Class::MethodMaker | ||||||||||
| 16 | 12 | ▶ | 'new_with_init' => 'new', | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 17 | 'get_set' => [qw(text bind_values)], | ||||||||||
| 18 | 12 | ; | |||||||||
| 19 | |||||||||||
| 20 | sub init | ||||||||||
| 21 | 6 | ▶ | { | ||||||||
|
Subroutine
init: called CC=2 SCAR=7.1
Pod
undocumented
| |||||||||||
| 22 | 6 | my ($self, $text, @bind_values) = @_; | |||||||||
| 23 | |||||||||||
| 24 | 6 | assert(UNIVERSAL::isa($self,__PACKAGE__)); | |||||||||
| 25 | 6 | assert(defined($text),'valid parameters'); | |||||||||
| 26 | |||||||||||
| 27 | 6 | $self->text($text); | |||||||||
| 28 | 6 | $self->bind_values([]); | |||||||||
| 29 | 0 | ▶ | push @{$self->bind_values},@bind_values if @bind_values; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 30 | } | ||||||||||
| 31 | |||||||||||
| 32 | sub sql | ||||||||||
| 33 | 0 | ▶ | { | ||||||||
|
Subroutine
sql: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 34 | 0 | my ($self, $dbh) = @_; | |||||||||
| 35 | 0 | return ctx_0($self->text, @{$self->bind_values}); | |||||||||
| 36 | } | ||||||||||
| 37 | |||||||||||
| 38 | |||||||||||
| 39 | 12 | 1; | |||||||||
| 40 | __END__ | ||||||||||