comparison Lib/IMPL/SQL/Schema/MySQL/CharType.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
comparison
equal deleted inserted replaced
270:3f59fd828d5f 271:56364d0c4b4f
1 package IMPL::SQL::Schema::MySQL::CharType;
2 use strict;
3
4 use IMPL::Const qw(:prop);
5 use IMPL::declare {
6 require => {
7 Exception => 'IMPL::Exception',
8 ArgException => '-IMPL::InvalidArgumentException'
9 },
10 base => [
11 'IMPL::SQL::Schema::Type' => '@_'
12 ],
13 props => [
14 encoding => PROP_RO
15 ]
16 };
17
18 my @CHAR_TYPES = qw(VARCHAR CHAR);
19
20 sub CTOR {
21 my ($this) = @_;
22
23 die ArgException->new(name => "The specified name is invalid", $this->name)
24 unless grep uc($this->name) eq $_, @CHAR_TYPES;
25 }
26
27 1;