annotate Lib/IMPL/SQL/Schema/Constraint/Index.pm @ 166:4267a2ac3d46
Added Class::Template,
Rewritten SQL::Schema
'use parent' directive instead of 'use base'
author |
wizard |
date |
Sat, 23 Apr 2011 23:12:06 +0400 |
parents |
76515373dac0 |
children |
6148f89bb7bf |
rev |
line source |
49
|
1 package IMPL::SQL::Schema::Constraint::Index;
|
|
2 use strict;
|
165
|
3 use parent qw(IMPL::SQL::Schema::Constraint);
|
49
|
4
|
|
5 __PACKAGE__->PassThroughArgs;
|
|
6
|
|
7 sub CTOR {
|
|
8 my $this = shift;
|
|
9
|
|
10 my %colnames;
|
165
|
11 not grep { $colnames{$_}++ } @{$this->columns} or die new Exception('Each column in the index can occur only once');
|
49
|
12 }
|
|
13
|
|
14 1;
|