File: PkConstraintColumn.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 (41 lines) | stat: -rw-r--r-- 1,538 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
use strict;
use warnings;

package UR::DataSource::RDBMS::PkConstraintColumn;

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

UR::Object::Type->define(
    class_name => 'UR::DataSource::RDBMS::PkConstraintColumn',
    is => ['UR::DataSource::RDBMS::Entity'],
    dsmap => 'dd_pk_constraint_column',
    er_role => '',
    id_properties => [qw/data_source owner table_name column_name rank/],
    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] ) },
        owner                            => { type => 'varchar', len => undef, is_optional => 1, sql => 'owner' },
        rank                             => { type => 'integer', len => undef, sql => 'rank' },
        table_name                       => { type => 'varchar', len => undef, sql => 'table_name' },
    ],
    data_source => 'UR::DataSource::Meta',
);

1;

=pod

=head1 NAME

UR::DataSource::RDBMS::PkConstraintColumn - metadata about a data source's primary keys

=head1 DESCRIPTION

This class represents columns that make up a primary key.  Tables with
multiple-column primary keys are ordered by their 'rank' property.

=cut