Mercurial > pub > Impl
diff Lib/IMPL/SQL/Schema/MySQL/EnumType.pm @ 271:56364d0c4b4f
+IMPL::SQL::Schema::MySQL: added basic support for MySQL
author | cin |
---|---|
date | Mon, 28 Jan 2013 02:43:14 +0400 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Lib/IMPL/SQL/Schema/MySQL/EnumType.pm Mon Jan 28 02:43:14 2013 +0400 @@ -0,0 +1,23 @@ +package IMPL::SQL::Schema::MySQL::EnumType; +use strict; + +use IMPL::Const qw(:prop); +use IMPL::declare { + base => [ + 'IMPL::SQL::Schema::Type' => '@_' + ], + props => [ + enumValues => PROP_RO | PROP_LIST + ] +}; + +our @ENUM_TYPES = qw(ENUM SET); + +sub CTOR { + my $this = shift; + + die ArgException->new(name => "The specified name is invalid", $this->name) + unless grep uc($this->name) eq $_, @ENUM_TYPES; +} + +1; \ No newline at end of file