line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MojoX::Mysql::Util; |
2
|
7
|
|
|
7
|
|
29
|
use Mojo::Base -base; |
|
7
|
|
|
|
|
9
|
|
|
7
|
|
|
|
|
36
|
|
3
|
7
|
|
|
7
|
|
817
|
use Mojo::Util qw(dumper); |
|
7
|
|
|
|
|
12
|
|
|
7
|
|
|
|
|
294
|
|
4
|
7
|
|
|
7
|
|
32
|
use Mojo::Collection 'c'; |
|
7
|
|
|
|
|
9
|
|
|
7
|
|
|
|
|
1588
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub quote { |
7
|
3
|
|
|
3
|
0
|
26
|
my ($self,$str,$default) = @_; |
8
|
3
|
|
100
|
|
|
10
|
$default ||= 'DEFAULT'; |
9
|
3
|
100
|
|
|
|
6
|
if($str){ |
10
|
1
|
|
|
|
|
11
|
$str =~ s/['\\]/\\$&/gmo; |
11
|
1
|
|
|
|
|
8
|
return qq{'$str'}; |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
else{ |
14
|
2
|
|
|
|
|
7
|
return $default; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub id { |
19
|
1
|
|
|
1
|
0
|
7
|
my ($self) = @_; |
20
|
1
|
|
|
|
|
3
|
my @keys = sort {$a <=> $b} grep($_ ne '_default',keys %{$self->{'config'}}); |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
13
|
|
21
|
1
|
|
|
|
|
6
|
return c(@keys); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |