comparison Lib/IMPL/SQL/Schema/Column.pm @ 315:77df11605d3a

code cleanup
author cin
date Tue, 07 May 2013 02:19:24 +0400
parents 68d905f8dc43
children
comparison
equal deleted inserted replaced
314:109f28643025 315:77df11605d3a
3 3
4 use IMPL::lang qw( :DEFAULT :compare :hash ); 4 use IMPL::lang qw( :DEFAULT :compare :hash );
5 use IMPL::Exception(); 5 use IMPL::Exception();
6 use IMPL::Const qw(:prop); 6 use IMPL::Const qw(:prop);
7 use IMPL::declare { 7 use IMPL::declare {
8 require => {
9 SchemaType => '-IMPL::SQL::Schema::Type'
10 },
8 base => [ 11 base => [
9 'IMPL::Object' => undef, 12 'IMPL::Object' => undef,
10 'IMPL::Object::Autofill' => '@_' 13 'IMPL::Object::Autofill' => '@_'
11 ], 14 ],
12 props => [ 15 props => [
24 $this->{$name} or 27 $this->{$name} or
25 die new IMPL::InvalidArgumentException('A column name is required'); 28 die new IMPL::InvalidArgumentException('A column name is required');
26 29
27 $this->{$isNullable} ||= 0; # if not exists $this->{$isNullable}; 30 $this->{$isNullable} ||= 0; # if not exists $this->{$isNullable};
28 31
29 is( $this->{$type}, typeof IMPL::SQL::Schema::Type) or 32 is( $this->{$type}, SchemaType) or
30 die new IMPL::InvalidArgumentException('a type is required for the column',$this->{$name}); 33 die new IMPL::InvalidArgumentException('a type is required for the column',$this->{$name});
31 } 34 }
32 35
33 sub SameValue { 36 sub SameValue {
34 my ($this,$other) = @_; 37 my ($this,$other) = @_;