From: Ken Youens-Clark Date: Wed, 5 Nov 2003 23:27:09 +0000 (+0000) Subject: Added "order" to tables (should have been there already, but was also causing X-Git-Tag: v0.04~20 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=56746e2a9575e2606ba3125e33be949ffc436433;p=dbsrgits%2FSQL-Translator.git Added "order" to tables (should have been there already, but was also causing the error "Use of uninitialized value in numeric comparison (<=>) at blib/lib/SQL/Translator/Parser/Sybase.pm line 334."). --- diff --git a/lib/SQL/Translator/Parser/Sybase.pm b/lib/SQL/Translator/Parser/Sybase.pm index 6c30700..bf48b55 100644 --- a/lib/SQL/Translator/Parser/Sybase.pm +++ b/lib/SQL/Translator/Parser/Sybase.pm @@ -1,7 +1,7 @@ package SQL::Translator::Parser::Sybase; # ------------------------------------------------------------------- -# $Id: Sybase.pm,v 1.7 2003-10-15 18:35:09 kycl4rk Exp $ +# $Id: Sybase.pm,v 1.8 2003-11-05 23:27:09 kycl4rk Exp $ # ------------------------------------------------------------------- # Copyright (C) 2003 Ken Y. Clark , # darren chamberlain , @@ -42,7 +42,7 @@ DBI-Sybase parser included with SQL::Translator. use strict; use vars qw[ $DEBUG $VERSION $GRAMMAR @EXPORT_OK ]; -$VERSION = sprintf "%d.%02d", q$Revision: 1.7 $ =~ /(\d+)\.(\d+)/; +$VERSION = sprintf "%d.%02d", q$Revision: 1.8 $ =~ /(\d+)\.(\d+)/; $DEBUG = 0 unless defined $DEBUG; use Data::Dumper; @@ -59,7 +59,7 @@ $::RD_HINT = 1; $GRAMMAR = q{ { - my ( %tables, @table_comments ); + my ( %tables, @table_comments, $table_order ); } startrule : statement(s) eofile { \%tables } @@ -133,6 +133,7 @@ create_table : /create/i /table/i ident '(' create_def(s /,/) ')' lock(?) on_sys @table_comments = (); } + $tables{ $table_name }{'order'} = ++$table_order; $tables{ $table_name }{'name'} = $table_name; $tables{ $table_name }{'owner'} = $table_owner; $tables{ $table_name }{'system'} = $item[7];