« blib/lib/UR/DataSource/RDBMS/Entity.pm
↑ Summary
blib/lib/UR/DataSource/RDBMS/Operator/Between.pm »
| 1 | use strict; | ||
| 2 | use warnings; | ||
| 3 | |||
| 4 | package UR::DataSource::RDBMS::FkConstraintColumn; | ||
| 5 | |||
| 6 | use UR; | ||
| 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 |