line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Rose::DB::Object::Metadata::Column::Integer; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
8
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
35
|
|
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
8
|
use Rose::DB::Object::Metadata::Column::Scalar; |
|
1
|
|
|
|
|
12
|
|
|
1
|
|
|
|
|
172
|
|
6
|
|
|
|
|
|
|
our @ISA = qw(Rose::DB::Object::Metadata::Column::Scalar); |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.788'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
__PACKAGE__->add_common_method_maker_argument_names(qw(min max)); |
11
|
|
|
|
|
|
|
__PACKAGE__->delete_common_method_maker_argument_names(qw(length)); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
Rose::Object::MakeMethods::Generic->make_methods |
14
|
|
|
|
|
|
|
( |
15
|
|
|
|
|
|
|
{ preserve_existing => 1 }, |
16
|
|
|
|
|
|
|
scalar => [ __PACKAGE__->common_method_maker_argument_names ] |
17
|
|
|
|
|
|
|
); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
foreach my $type (__PACKAGE__->available_method_types) |
20
|
|
|
|
|
|
|
{ |
21
|
|
|
|
|
|
|
__PACKAGE__->method_maker_type($type => 'integer'); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
9
|
|
|
9
|
1
|
33
|
sub type { 'integer' } |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub should_inline_value |
27
|
|
|
|
|
|
|
{ |
28
|
0
|
|
|
0
|
1
|
|
my($self, $db, $value) = @_; |
29
|
1
|
|
|
1
|
|
7
|
no warnings 'uninitialized'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
220
|
|
30
|
0
|
0
|
0
|
|
|
|
return (($db->validate_integer_keyword($value) && $db->should_inline_integer_keyword($value)) || |
31
|
|
|
|
|
|
|
($db->keyword_function_calls && $value =~ /^\w+\(.*\)$/)) ? 1 : 0; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub perl_column_definition_attributes |
35
|
|
|
|
|
|
|
{ |
36
|
0
|
|
|
0
|
0
|
|
grep { $_ ne 'length' } shift->SUPER::perl_column_definition_attributes; |
|
0
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
__END__ |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 NAME |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Rose::DB::Object::Metadata::Column::Integer - Integer column metadata. |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 SYNOPSIS |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
use Rose::DB::Object::Metadata::Column::Integer; |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
$col = Rose::DB::Object::Metadata::Column::Integer->new(...); |
52
|
|
|
|
|
|
|
$col->make_methods(...); |
53
|
|
|
|
|
|
|
... |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 DESCRIPTION |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Objects of this class store and manipulate metadata for integer columns in a database. Column metadata objects store information about columns (data type, size, etc.) and are responsible for creating object methods that manipulate column values. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
This class inherits from L<Rose::DB::Object::Metadata::Column::Scalar>. Inherited methods that are not overridden will not be documented a second time here. See the L<Rose::DB::Object::Metadata::Column::Scalar> documentation for more information. |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 METHOD MAP |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=over 4 |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=item C<get_set> |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
L<Rose::DB::Object::MakeMethods::Generic>, L<integer|Rose::DB::Object::MakeMethods::Generic/integer>, C<interface =E<gt> 'get_set', ...> |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=item C<get> |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
L<Rose::DB::Object::MakeMethods::Generic>, L<integer|Rose::DB::Object::MakeMethods::Generic/integer>, C<interface =E<gt> 'get', ...> |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=item C<get_set> |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
L<Rose::DB::Object::MakeMethods::Generic>, L<integer|Rose::DB::Object::MakeMethods::Generic/integer>, C<interface =E<gt> 'set', ...> |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=back |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
See the L<Rose::DB::Object::Metadata::Column|Rose::DB::Object::Metadata::Column/"MAKING METHODS"> documentation for an explanation of this method map. |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head1 OBJECT METHODS |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=over 4 |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=item B<max [INT]> |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
Get or set the maximum value this column is allowed to have. |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=item B<min [INT]> |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
Get or set the minimum value this column is allowed to have. |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=item B<type> |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
Returns "integer". |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=back |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head1 AUTHOR |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
John C. Siracusa (siracusa@gmail.com) |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=head1 LICENSE |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
Copyright (c) 2010 by John C. Siracusa. All rights reserved. This program is |
106
|
|
|
|
|
|
|
free software; you can redistribute it and/or modify it under the same terms |
107
|
|
|
|
|
|
|
as Perl itself. |