X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FSQL%2FTranslator%2FParser%2FXML%2FSQLFairy.pm;h=607ba52b667881d49bb776b3d86d49141167c198;hb=821a0fde221f5accf93e3f65efa77b5a6733cb5e;hp=86cec9b4bdbc08fa0d53cd434f03340265cac1a0;hpb=53a533efd3d31030564a8d9d480b7209abd4ef35;p=dbsrgits%2FSQL-Translator.git diff --git a/lib/SQL/Translator/Parser/XML/SQLFairy.pm b/lib/SQL/Translator/Parser/XML/SQLFairy.pm index 86cec9b..607ba52 100644 --- a/lib/SQL/Translator/Parser/XML/SQLFairy.pm +++ b/lib/SQL/Translator/Parser/XML/SQLFairy.pm @@ -1,7 +1,7 @@ package SQL::Translator::Parser::XML::SQLFairy; # ------------------------------------------------------------------- -# $Id: SQLFairy.pm,v 1.13 2004-12-21 01:29:23 grommit Exp $ +# $Id$ # ------------------------------------------------------------------- # Copyright (C) 2003 Mark Addison , # @@ -100,7 +100,7 @@ To convert your old format files simply pass them through the translator :) use strict; use vars qw[ $DEBUG $VERSION @EXPORT_OK ]; -$VERSION = sprintf "%d.%02d", q$Revision: 1.13 $ =~ /(\d+)\.(\d+)/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /(\d+)\.(\d+)/; $DEBUG = 0 unless defined $DEBUG; use Data::Dumper; @@ -186,7 +186,7 @@ sub parse { foreach (@nodes) { my %data = get_tagfields($xp, $_, "sqlf:", qw/name type table fields reference_fields reference_table - match_type on_delete_do on_update_do extra/ + match_type on_delete on_update extra/ ); $table->add_constraint( %data ) or die $table->error; } @@ -201,6 +201,16 @@ sub parse { $table->add_index( %data ) or die $table->error; } + + # + # Comments + # + @nodes = $xp->findnodes('sqlf:comments/sqlf:comment',$tblnode); + foreach (@nodes) { + my $data = $_->string_value; + $table->comments( $data ); + } + } # tables loop #