File: FkConstraintColumn.pm

package info (click to toggle)
libur-perl 0.430-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 6,672 kB
  • ctags: 2,417
  • sloc: perl: 58,778; xml: 108; sh: 13; makefile: 4
file content (47 lines) | stat: -rw-r--r-- 1,916 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
use strict;
use warnings;

package UR::DataSource::RDBMS::FkConstraintColumn;

use UR;
our $VERSION = "0.43"; # UR $VERSION;

UR::Object::Type->define(
    class_name => 'UR::DataSource::RDBMS::FkConstraintColumn',
    is => ['UR::DataSource::RDBMS::Entity'],
    dsmap => 'dd_fk_constraint_column',
    er_role => 'bridge',
    id_properties => [qw/data_source owner table_name fk_constraint_name column_name/],
    properties => [
        column_name                      => { type => 'varchar', len => undef, sql => 'column_name' },
        data_source                      => { type => 'varchar', len => undef, sql => 'data_source' },
        data_source_obj                  => { type => 'UR::DataSource', id_by => 'data_source'},
        namespace                        => { calculate_from => [ 'data_source'],
                                              calculate => q( (split(/::/,$data_source))[0] ) },
        fk_constraint_name               => { type => 'varchar', len => undef, sql => 'fk_constraint_name' },
        owner                            => { type => 'varchar', len => undef, is_optional => 1, sql => 'owner' },
        table_name                       => { type => 'varchar', len => undef, sql => 'table_name' },
        r_column_name                    => { type => 'varchar', len => undef, sql => 'r_column_name' },
        r_table_name                     => { type => 'varchar', len => undef, sql => 'r_table_name' },
    ],
    data_source => 'UR::DataSource::Meta',
);

1;

=pod

=head1 NAME 

UR::DataSource::RDBMS::FkConstraintColumn - metadata about a data source's foreign keys

=head1 DESCRIPTION

This class represents the column linkages that make up a foreign key.  Each
instance has a column_name (the source, where the foreign key points from)
and r_column_name (remote column name, where the fireign key points to),
as well as the source and remote table names.

=cut