All Schema objects now have an extra attribute. Added parsing support (and
[dbsrgits/SQL-Translator.git] / lib / SQL / Translator / Producer / Dumper.pm
index 2bb2cb1..27f27ba 100644 (file)
@@ -1,7 +1,7 @@
 package SQL::Translator::Producer::Dumper;
 
 # -------------------------------------------------------------------
-# $Id: Dumper.pm,v 1.5 2004-04-23 12:46:53 kycl4rk Exp $
+# $Id: Dumper.pm,v 1.8 2004-07-23 15:38:20 kycl4rk Exp $
 # -------------------------------------------------------------------
 # Copyright (C) 2002-4 SQLFairy Authors
 #
@@ -61,7 +61,7 @@ use vars qw($VERSION);
 
 use Data::Dumper;
 
-$VERSION = sprintf "%d.%02d", q$Revision: 1.5 $ =~ /(\d+)\.(\d+)/;
+$VERSION = sprintf "%d.%02d", q$Revision: 1.8 $ =~ /(\d+)\.(\d+)/;
 
 sub produce {
     my $t              = shift;
@@ -166,7 +166,8 @@ Usage:
     --mysql-loadfile   Create MySQL's LOAD FILE syntax, not INSERTs
     --no-comments      Suppress comments
     --skip=t1[,t2]     Comma-separated list of tables to skip
-    --skiplike=regex   Comma-separated list of tables to skip
+    --skiplike=regex   Regular expression of table names to skip
+    --takelike=regex   Regular expression of table names to take
 
 USAGE
     exit(0);
@@ -189,7 +190,7 @@ FOREACH table IN schema.get_tables;
         field_name = field.name;
         fname_len  = field.name.length;
         max_field  = fname_len > max_field ? fname_len : max_field;
-        types.$field_name = field.data_type.match( '(char|str|long|text)' )
+        types.$field_name = field.data_type.match( '(char|str|long|text|enum|date)' )
             ? 'string' : 'number';
         field_names.push( field_name );
     END;