Mercurial > pub > Impl
comparison lib/IMPL/SQL/Types.pm @ 407:c6e90e02dd17 ref20150831
renamed Lib->lib
| author | cin |
|---|---|
| date | Fri, 04 Sep 2015 19:40:23 +0300 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 406:f23fcb19d3c1 | 407:c6e90e02dd17 |
|---|---|
| 1 package IMPL::SQL::Types; | |
| 2 use strict; | |
| 3 use warnings; | |
| 4 | |
| 5 require Exporter; | |
| 6 our @ISA = qw(Exporter); | |
| 7 our @EXPORT_OK = qw(&Integer &Varchar &Float &Real &Text &Binary &DateTime); | |
| 8 | |
| 9 require IMPL::SQL::Schema::Type; | |
| 10 | |
| 11 sub Integer() { | |
| 12 return IMPL::SQL::Schema::Type->new(name => 'INTEGER'); | |
| 13 } | |
| 14 | |
| 15 sub Varchar($) { | |
| 16 return IMPL::SQL::Schema::Type->new(name => 'VARCHAR', maxLength => shift); | |
| 17 } | |
| 18 | |
| 19 sub Float($) { | |
| 20 return IMPL::SQL::Schema::Type->new(name => 'FLOAT', scale => shift); | |
| 21 } | |
| 22 | |
| 23 sub Real() { | |
| 24 return IMPL::SQL::Schema::Type->new(name => 'REAL'); | |
| 25 } | |
| 26 | |
| 27 sub Text() { | |
| 28 return IMPL::SQL::Schema::Type->new(name => 'TEXT'); | |
| 29 } | |
| 30 | |
| 31 sub Binary() { | |
| 32 return IMPL::SQL::Schema::Type->new(name => 'BINARY'); | |
| 33 } | |
| 34 | |
| 35 sub DateTime() { | |
| 36 return IMPL::SQL::Schema::Type->new(name => 'DATETIME'); | |
| 37 } | |
| 38 | |
| 39 1; |
