File Coverage

lib/UR/DataSource/RDBMS/FkConstraintColumn.pm
Criterion Covered Total %
statement 9 9 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 12 12 100.0


line stmt bran cond sub pod time code
1 7     7   276 use strict;
  7         11  
  7         1188  
2 7     7   40 use warnings;
  7         10  
  7         330  
3              
4             package UR::DataSource::RDBMS::FkConstraintColumn;
5              
6 7     7   26 use UR;
  7         9  
  7         37  
7             our $VERSION = "0.46"; # UR $VERSION;
8              
9             UR::Object::Type->define(
10             class_name => 'UR::DataSource::RDBMS::FkConstraintColumn',
11             is => ['UR::DataSource::RDBMS::Entity'],
12             dsmap => 'dd_fk_constraint_column',
13             er_role => 'bridge',
14             id_properties => [qw/data_source table_name fk_constraint_name column_name/],
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             fk_constraint_name => { type => 'varchar', len => undef, sql => 'fk_constraint_name' },
22             table_name => { type => 'varchar', len => undef, sql => 'table_name' },
23             r_column_name => { type => 'varchar', len => undef, sql => 'r_column_name' },
24             r_table_name => { type => 'varchar', len => undef, sql => 'r_table_name' },
25             ],
26             data_source => 'UR::DataSource::Meta',
27             );
28              
29             1;
30              
31             =pod
32              
33             =head1 NAME
34              
35             UR::DataSource::RDBMS::FkConstraintColumn - metadata about a data source's foreign keys
36              
37             =head1 DESCRIPTION
38              
39             This class represents the column linkages that make up a foreign key. Each
40             instance has a column_name (the source, where the foreign key points from)
41             and r_column_name (remote column name, where the fireign key points to),
42             as well as the source and remote table names.
43              
44             =cut
45              
46