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