view lib/IMPL/SQL/Schema/Constraint/Index.pm @ 417:3ed0c58e9da3 ref20150831

working on di container, tests
author cin
date Mon, 02 Nov 2015 01:56:53 +0300
parents c6e90e02dd17
children
line wrap: on
line source

package IMPL::SQL::Schema::Constraint::Index;
use strict;
use parent qw(IMPL::SQL::Schema::Constraint);

__PACKAGE__->PassThroughArgs;
__PACKAGE__->RegisterAlias('index');

sub CTOR {
    my $this = shift;
    
    my %colnames;
    not grep { $colnames{$_}++ } $this->columns or die new Exception('Each column in the index can occur only once');
}

1;