diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Lib/IMPL/SQL/Types.pm	Mon Nov 09 16:49:39 2009 +0300
@@ -0,0 +1,35 @@
+package IMPL::SQL::Types;
+use strict;
+use warnings;
+
+require Exporter;
+our @ISA = qw(Exporter);
+our @EXPORT_OK = qw(&Integer &Varchar &Float &Real &Text &Binary);
+
+require IMPL::SQL::Schema::Type;
+
+sub Integer() {
+    return IMPL::SQL::Schema::Type->new(Name => 'INTEGER');
+}
+
+sub Varchar($) {
+    return IMPL::SQL::Schema::Type->new(Name => 'VARCHAR', Length => shift);
+}
+
+sub Float($) {
+    return IMPL::SQL::Schema::Type->new(Name => 'FLOAT', Scale => shift);
+}
+
+sub Real() {
+    return IMPL::SQL::Schema::Type->new(Name => 'REAL');
+}
+
+sub Text() {
+    return IMPL::SQL::Schema::Type->new(Name => 'TEXT');
+}
+
+sub Binary() {
+    return IMPL::SQL::Schema::Type->new(Name => 'BINARY');
+}
+
+1;