line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
24
|
|
|
24
|
|
1013
|
use strict; |
|
24
|
|
|
|
|
37
|
|
|
24
|
|
|
|
|
4188
|
|
2
|
24
|
|
|
24
|
|
127
|
use warnings; |
|
24
|
|
|
|
|
37
|
|
|
24
|
|
|
|
|
1086
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package UR::DataSource::RDBMS::PkConstraintColumn; |
5
|
|
|
|
|
|
|
|
6
|
24
|
|
|
24
|
|
95
|
use UR; |
|
24
|
|
|
|
|
81
|
|
|
24
|
|
|
|
|
144
|
|
7
|
|
|
|
|
|
|
our $VERSION = "0.46"; # UR $VERSION; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
UR::Object::Type->define( |
10
|
|
|
|
|
|
|
class_name => 'UR::DataSource::RDBMS::PkConstraintColumn', |
11
|
|
|
|
|
|
|
is => ['UR::DataSource::RDBMS::Entity'], |
12
|
|
|
|
|
|
|
dsmap => 'dd_pk_constraint_column', |
13
|
|
|
|
|
|
|
er_role => '', |
14
|
|
|
|
|
|
|
id_properties => [qw/data_source table_name column_name rank/], |
15
|
|
|
|
|
|
|
properties => [ |
16
|
|
|
|
|
|
|
column_name => { type => 'varchar', len => undef, sql => 'column_name' }, |
17
|
|
|
|
|
|
|
data_source => { type => 'varchar', len => undef, sql => 'data_source' }, |
18
|
|
|
|
|
|
|
data_source_obj => { type => 'UR::DataSource', id_by => 'data_source'}, |
19
|
|
|
|
|
|
|
namespace => { calculate_from => [ 'data_source'], |
20
|
|
|
|
|
|
|
calculate => q( (split(/::/,$data_source))[0] ) }, |
21
|
|
|
|
|
|
|
owner => { type => 'varchar', len => undef, is_optional => 1, sql => 'owner' }, |
22
|
|
|
|
|
|
|
rank => { type => 'integer', len => undef, sql => 'rank' }, |
23
|
|
|
|
|
|
|
table_name => { type => 'varchar', len => undef, sql => 'table_name' }, |
24
|
|
|
|
|
|
|
], |
25
|
|
|
|
|
|
|
data_source => 'UR::DataSource::Meta', |
26
|
|
|
|
|
|
|
); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=pod |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 NAME |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
UR::DataSource::RDBMS::PkConstraintColumn - metadata about a data source's primary keys |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 DESCRIPTION |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
This class represents columns that make up a primary key. Tables with |
39
|
|
|
|
|
|
|
multiple-column primary keys are ordered by their 'rank' property. |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=cut |