Mercurial > pub > Impl
comparison Lib/IMPL/SQL/Types.pm @ 33:0004faa276dc
small fixes, some new tests
author | Sergey |
---|---|
date | Mon, 09 Nov 2009 16:49:39 +0300 |
parents | |
children | d660fb38b7cc |
comparison
equal
deleted
inserted
replaced
32:56cef8e3cda6 | 33:0004faa276dc |
---|---|
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); | |
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', Length => 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 1; |