line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package DSCS::Memory::Users; #A table/row class |
2
|
1
|
|
|
1
|
|
857
|
use 5.010001; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
60
|
|
3
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
5
|
1
|
|
|
1
|
|
5
|
use utf8; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
6
|
1
|
|
|
1
|
|
21
|
use parent qw(DSCS::Memory); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
9
|
|
7
|
|
|
|
|
|
|
|
8
|
0
|
|
|
0
|
1
|
|
sub is_base_class{return 0} |
9
|
|
|
|
|
|
|
my $TABLE_NAME = 'users'; |
10
|
|
|
|
|
|
|
|
11
|
0
|
|
|
0
|
1
|
|
sub TABLE {return $TABLE_NAME} |
12
|
0
|
|
|
0
|
1
|
|
sub PRIMARY_KEY{return 'id'} |
13
|
|
|
|
|
|
|
my $COLUMNS = [ |
14
|
|
|
|
|
|
|
'id', |
15
|
|
|
|
|
|
|
'group_id', |
16
|
|
|
|
|
|
|
'login_name', |
17
|
|
|
|
|
|
|
'login_password', |
18
|
|
|
|
|
|
|
'name', |
19
|
|
|
|
|
|
|
'email', |
20
|
|
|
|
|
|
|
'disabled', |
21
|
|
|
|
|
|
|
'balance', |
22
|
|
|
|
|
|
|
'dummy_dec', |
23
|
|
|
|
|
|
|
'nullable_column' |
24
|
|
|
|
|
|
|
]; |
25
|
|
|
|
|
|
|
|
26
|
0
|
|
|
0
|
1
|
|
sub COLUMNS {return $COLUMNS} |
27
|
|
|
|
|
|
|
my $ALIASES = {}; |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
0
|
1
|
|
sub ALIASES {return $ALIASES} |
30
|
|
|
|
|
|
|
my $CHECKS = { |
31
|
|
|
|
|
|
|
'id' => { |
32
|
|
|
|
|
|
|
'allow' => qr/^-?\d{1,}$/x |
33
|
|
|
|
|
|
|
}, |
34
|
|
|
|
|
|
|
'email' => { |
35
|
|
|
|
|
|
|
'defined' => 1, |
36
|
|
|
|
|
|
|
'required' => 1, |
37
|
|
|
|
|
|
|
'default' => 'email@domain.com', |
38
|
|
|
|
|
|
|
'allow' => sub { "DUMMY" } |
39
|
|
|
|
|
|
|
}, |
40
|
|
|
|
|
|
|
'group_id' => { |
41
|
|
|
|
|
|
|
'allow' => qr/^-?\d{1,11}$/x, |
42
|
|
|
|
|
|
|
'required' => 1, |
43
|
|
|
|
|
|
|
'defined' => 1 |
44
|
|
|
|
|
|
|
}, |
45
|
|
|
|
|
|
|
'disabled' => { |
46
|
|
|
|
|
|
|
'allow' => qr/^-?\d{1,1}$/x, |
47
|
|
|
|
|
|
|
'defined' => 1, |
48
|
|
|
|
|
|
|
'required' => 1, |
49
|
|
|
|
|
|
|
'default' => '0' |
50
|
|
|
|
|
|
|
}, |
51
|
|
|
|
|
|
|
'name' => { |
52
|
|
|
|
|
|
|
'allow' => sub { "DUMMY" }, |
53
|
|
|
|
|
|
|
'default' => '', |
54
|
|
|
|
|
|
|
'defined' => 1, |
55
|
|
|
|
|
|
|
'required' => 1 |
56
|
|
|
|
|
|
|
}, |
57
|
|
|
|
|
|
|
'dummy_dec' => { |
58
|
|
|
|
|
|
|
'required' => 1, |
59
|
|
|
|
|
|
|
'defined' => 1, |
60
|
|
|
|
|
|
|
'default' => '0', |
61
|
|
|
|
|
|
|
'allow' => qr/^-?\d{1,8}(?:\.\d{0,0})?$/x |
62
|
|
|
|
|
|
|
}, |
63
|
|
|
|
|
|
|
'nullable_column' => { |
64
|
|
|
|
|
|
|
'allow' => sub { "DUMMY" } |
65
|
|
|
|
|
|
|
}, |
66
|
|
|
|
|
|
|
'login_name' => { |
67
|
|
|
|
|
|
|
'defined' => 1, |
68
|
|
|
|
|
|
|
'required' => 1, |
69
|
|
|
|
|
|
|
'allow' => sub { "DUMMY" } |
70
|
|
|
|
|
|
|
}, |
71
|
|
|
|
|
|
|
'balance' => { |
72
|
|
|
|
|
|
|
'required' => 1, |
73
|
|
|
|
|
|
|
'defined' => 1, |
74
|
|
|
|
|
|
|
'default' => '0.00', |
75
|
|
|
|
|
|
|
'allow' => qr/^-?\d{1,6}(?:\.\d{0,2})?$/x |
76
|
|
|
|
|
|
|
}, |
77
|
|
|
|
|
|
|
'login_password' => { |
78
|
|
|
|
|
|
|
'defined' => 1, |
79
|
|
|
|
|
|
|
'required' => 1, |
80
|
|
|
|
|
|
|
'allow' => sub { "DUMMY" } |
81
|
|
|
|
|
|
|
} |
82
|
|
|
|
|
|
|
}; |
83
|
|
|
|
|
|
|
|
84
|
0
|
|
|
0
|
1
|
|
sub CHECKS {return $CHECKS} |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
__PACKAGE__->QUOTE_IDENTIFIERS(0); |
87
|
|
|
|
|
|
|
#__PACKAGE__->BUILD;#build accessors during load |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
1; |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=pod |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=encoding utf8 |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head1 NAME |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
A class for TABLE users in schema main |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head1 SYNOPSIS |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=head1 DESCRIPTION |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=head1 COLUMNS |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
Each column from table C has an accessor method in this class. |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=head2 id |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=head2 group_id |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=head2 login_name |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=head2 login_password |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=head2 name |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=head2 email |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=head2 disabled |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=head2 balance |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=head2 dummy_dec |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=head2 nullable_column |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=head1 ALIASES |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=head1 GENERATOR |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
L |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
=head1 SEE ALSO |
134
|
|
|
|
|
|
|
L, L, L |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=head1 AUTHOR |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
=cut |