view lib/IMPL/SQL/Schema/Constraint/Index.pm @ 408:5c80e33f1218 ref20150831

added 'coarsen' function
author cin
date Mon, 07 Sep 2015 01:35:25 +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;