annotate Lib/IMPL/SQL/Types.pm @ 44:32d2350fccf9

ORM *Minor fixes *Working tarnsform to sql *Fixes to the sql traits
author Sergey
date Mon, 11 Jan 2010 01:42:00 +0300
parents d660fb38b7cc
children 16ada169ca75
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
33
0004faa276dc small fixes, some new tests
Sergey
parents:
diff changeset
1 package IMPL::SQL::Types;
0004faa276dc small fixes, some new tests
Sergey
parents:
diff changeset
2 use strict;
0004faa276dc small fixes, some new tests
Sergey
parents:
diff changeset
3 use warnings;
0004faa276dc small fixes, some new tests
Sergey
parents:
diff changeset
4
0004faa276dc small fixes, some new tests
Sergey
parents:
diff changeset
5 require Exporter;
0004faa276dc small fixes, some new tests
Sergey
parents:
diff changeset
6 our @ISA = qw(Exporter);
38
d660fb38b7cc small fixes
Sergey
parents: 33
diff changeset
7 our @EXPORT_OK = qw(&Integer &Varchar &Float &Real &Text &Binary &DateTime);
33
0004faa276dc small fixes, some new tests
Sergey
parents:
diff changeset
8
0004faa276dc small fixes, some new tests
Sergey
parents:
diff changeset
9 require IMPL::SQL::Schema::Type;
0004faa276dc small fixes, some new tests
Sergey
parents:
diff changeset
10
0004faa276dc small fixes, some new tests
Sergey
parents:
diff changeset
11 sub Integer() {
0004faa276dc small fixes, some new tests
Sergey
parents:
diff changeset
12 return IMPL::SQL::Schema::Type->new(Name => 'INTEGER');
0004faa276dc small fixes, some new tests
Sergey
parents:
diff changeset
13 }
0004faa276dc small fixes, some new tests
Sergey
parents:
diff changeset
14
0004faa276dc small fixes, some new tests
Sergey
parents:
diff changeset
15 sub Varchar($) {
44
Sergey
parents: 38
diff changeset
16 return IMPL::SQL::Schema::Type->new(Name => 'VARCHAR', MaxLength => shift);
33
0004faa276dc small fixes, some new tests
Sergey
parents:
diff changeset
17 }
0004faa276dc small fixes, some new tests
Sergey
parents:
diff changeset
18
0004faa276dc small fixes, some new tests
Sergey
parents:
diff changeset
19 sub Float($) {
0004faa276dc small fixes, some new tests
Sergey
parents:
diff changeset
20 return IMPL::SQL::Schema::Type->new(Name => 'FLOAT', Scale => shift);
0004faa276dc small fixes, some new tests
Sergey
parents:
diff changeset
21 }
0004faa276dc small fixes, some new tests
Sergey
parents:
diff changeset
22
0004faa276dc small fixes, some new tests
Sergey
parents:
diff changeset
23 sub Real() {
0004faa276dc small fixes, some new tests
Sergey
parents:
diff changeset
24 return IMPL::SQL::Schema::Type->new(Name => 'REAL');
0004faa276dc small fixes, some new tests
Sergey
parents:
diff changeset
25 }
0004faa276dc small fixes, some new tests
Sergey
parents:
diff changeset
26
0004faa276dc small fixes, some new tests
Sergey
parents:
diff changeset
27 sub Text() {
0004faa276dc small fixes, some new tests
Sergey
parents:
diff changeset
28 return IMPL::SQL::Schema::Type->new(Name => 'TEXT');
0004faa276dc small fixes, some new tests
Sergey
parents:
diff changeset
29 }
0004faa276dc small fixes, some new tests
Sergey
parents:
diff changeset
30
0004faa276dc small fixes, some new tests
Sergey
parents:
diff changeset
31 sub Binary() {
0004faa276dc small fixes, some new tests
Sergey
parents:
diff changeset
32 return IMPL::SQL::Schema::Type->new(Name => 'BINARY');
0004faa276dc small fixes, some new tests
Sergey
parents:
diff changeset
33 }
0004faa276dc small fixes, some new tests
Sergey
parents:
diff changeset
34
38
d660fb38b7cc small fixes
Sergey
parents: 33
diff changeset
35 sub DateTime() {
d660fb38b7cc small fixes
Sergey
parents: 33
diff changeset
36 return IMPL::SQL::Schema::Type->new(Name => 'DATETIME');
d660fb38b7cc small fixes
Sergey
parents: 33
diff changeset
37 }
d660fb38b7cc small fixes
Sergey
parents: 33
diff changeset
38
33
0004faa276dc small fixes, some new tests
Sergey
parents:
diff changeset
39 1;