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