line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package SQL::OOP::Update; |
2
|
3
|
|
|
3
|
|
1758
|
use strict; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
104
|
|
3
|
3
|
|
|
3
|
|
16
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
77
|
|
4
|
3
|
|
|
3
|
|
16
|
use SQL::OOP::Base; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
71
|
|
5
|
3
|
|
|
3
|
|
1182
|
use SQL::OOP::Where; |
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
89
|
|
6
|
3
|
|
|
3
|
|
1682
|
use SQL::OOP::Dataset; |
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
138
|
|
7
|
3
|
|
|
3
|
|
20
|
use base qw(SQL::OOP::Command); |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
1444
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub ARG_TABLE() {1} ## no critic |
10
|
|
|
|
|
|
|
sub ARG_DATASET() {2} ## no critic |
11
|
|
|
|
|
|
|
sub ARG_FROM() {3} ## no critic |
12
|
|
|
|
|
|
|
sub ARG_WHERE() {4} ## no critic |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
### --- |
15
|
|
|
|
|
|
|
### Get Names of set arguments in array ref |
16
|
|
|
|
|
|
|
### --- |
17
|
|
|
|
|
|
|
sub KEYS { |
18
|
106
|
|
|
106
|
1
|
462
|
return [ARG_TABLE, ARG_DATASET, ARG_FROM, ARG_WHERE]; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
### --- |
22
|
|
|
|
|
|
|
### Get prefixes for each clause in hash ref |
23
|
|
|
|
|
|
|
### --- |
24
|
|
|
|
|
|
|
sub PREFIXES { |
25
|
|
|
|
|
|
|
return { |
26
|
10
|
|
|
10
|
1
|
47
|
ARG_TABLE() => 'UPDATE', |
27
|
|
|
|
|
|
|
ARG_DATASET() => 'SET', |
28
|
|
|
|
|
|
|
ARG_FROM() => 'FROM', |
29
|
|
|
|
|
|
|
ARG_WHERE() => 'WHERE', |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
### --- |
34
|
|
|
|
|
|
|
### Constructor |
35
|
|
|
|
|
|
|
### --- |
36
|
|
|
|
|
|
|
sub new { |
37
|
10
|
|
|
10
|
1
|
16354
|
my ($class, %hash) = @_; |
38
|
10
|
|
|
|
|
85
|
return $class->SUPER::new(%hash); |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
### --- |
42
|
|
|
|
|
|
|
### Set elements |
43
|
|
|
|
|
|
|
### --- |
44
|
|
|
|
|
|
|
sub set { |
45
|
22
|
|
|
22
|
1
|
74
|
my ($class, %hash) = @_; |
46
|
22
|
|
|
|
|
111
|
return $class->SUPER::set(%hash); |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
### --- |
50
|
|
|
|
|
|
|
### Get SQL snippet |
51
|
|
|
|
|
|
|
### --- |
52
|
|
|
|
|
|
|
sub to_string { |
53
|
10
|
|
|
10
|
1
|
22
|
my ($self) = @_; |
54
|
10
|
|
|
|
|
79
|
local $SQL::OOP::Base::quote_char = $self->quote_char; |
55
|
10
|
|
|
|
|
67
|
$self->{array}->[1]->generate(SQL::OOP::Dataset->MODE_UPDATE); |
56
|
10
|
|
|
|
|
64
|
return shift->SUPER::to_string(@_); |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
### --- |
60
|
|
|
|
|
|
|
### Get binded values in array |
61
|
|
|
|
|
|
|
### --- |
62
|
|
|
|
|
|
|
sub bind { |
63
|
9
|
|
|
9
|
1
|
120
|
return shift->SUPER::bind(@_); |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
1; |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
__END__ |