line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package SQL::Composer; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
26468
|
use strict; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
49
|
|
4
|
2
|
|
|
2
|
|
5
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
73
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.17'; |
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
8
|
use base 'Exporter'; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
311
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our @EXPORT_OK = qw(sql_select sql_insert sql_delete sql_update sql_upsert); |
11
|
|
|
|
|
|
|
our %EXPORT_TAGS = (funcs => [qw(sql_select sql_insert sql_delete sql_update sql_upsert)]); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
require Carp; |
14
|
2
|
|
|
2
|
|
692
|
use SQL::Composer::Select; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
47
|
|
15
|
2
|
|
|
2
|
|
731
|
use SQL::Composer::Insert; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
42
|
|
16
|
2
|
|
|
2
|
|
562
|
use SQL::Composer::Delete; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
43
|
|
17
|
2
|
|
|
2
|
|
621
|
use SQL::Composer::Update; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
806
|
|
18
|
2
|
|
|
2
|
|
556
|
use SQL::Composer::Upsert; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
325
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
$Carp::Internal{(__PACKAGE__)}++; |
21
|
|
|
|
|
|
|
$Carp::Internal{"SQL::Composer::$_"}++ for qw/ |
22
|
|
|
|
|
|
|
Select |
23
|
|
|
|
|
|
|
Insert |
24
|
|
|
|
|
|
|
Delete |
25
|
|
|
|
|
|
|
Update |
26
|
|
|
|
|
|
|
Upsert |
27
|
|
|
|
|
|
|
Expression |
28
|
|
|
|
|
|
|
Join |
29
|
|
|
|
|
|
|
Quoter |
30
|
|
|
|
|
|
|
/; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub build { |
33
|
5
|
|
|
5
|
1
|
669
|
my $class = shift; |
34
|
5
|
|
|
|
|
10
|
my ($name) = shift; |
35
|
|
|
|
|
|
|
|
36
|
5
|
|
|
|
|
14
|
my $class_name = 'SQL::Composer::' . ucfirst($name); |
37
|
5
|
|
|
|
|
40
|
return $class_name->new(@_); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
1
|
|
|
1
|
0
|
786
|
sub sql_select { build(__PACKAGE__, 'select', @_) } |
41
|
1
|
|
|
1
|
0
|
1359
|
sub sql_insert { build(__PACKAGE__, 'insert', @_) } |
42
|
1
|
|
|
1
|
0
|
1181
|
sub sql_update { build(__PACKAGE__, 'update', @_) } |
43
|
1
|
|
|
1
|
0
|
1145
|
sub sql_delete { build(__PACKAGE__, 'delete', @_) } |
44
|
0
|
|
|
0
|
0
|
|
sub sql_upsert { build(__PACKAGE__, 'upsert', @_) } |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |
47
|
|
|
|
|
|
|
__END__ |