X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FSQL%2FTranslator%2FParser%2FAccess.pm;h=696ebcb00be095ee11308bf80bef55cecb7df6ab;hb=44659089c28216f1984873bc4aa8641e2e0e3410;hp=b243ca820bf26fe3cf07b32d7d4ce2898dec0784;hpb=de8ae813c2d33059e89b300b67fd192e1211b017;p=dbsrgits%2FSQL-Translator.git diff --git a/lib/SQL/Translator/Parser/Access.pm b/lib/SQL/Translator/Parser/Access.pm index b243ca8..696ebcb 100644 --- a/lib/SQL/Translator/Parser/Access.pm +++ b/lib/SQL/Translator/Parser/Access.pm @@ -1,9 +1,7 @@ package SQL::Translator::Parser::Access; # ------------------------------------------------------------------- -# $Id: Access.pm,v 1.2 2004-07-30 21:56:18 kycl4rk Exp $ -# ------------------------------------------------------------------- -# Copyright (C) 2002-4 SQLFairy Authors +# Copyright (C) 2002-2009 SQLFairy Authors # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as @@ -41,7 +39,7 @@ something similar to the output of mdbtools (http://mdbtools.sourceforge.net/). use strict; use vars qw[ $DEBUG $VERSION $GRAMMAR @EXPORT_OK ]; -$VERSION = sprintf "%d.%02d", q$Revision: 1.2 $ =~ /(\d+)\.(\d+)/; +$VERSION = '1.59'; $DEBUG = 0 unless defined $DEBUG; use Data::Dumper; @@ -211,15 +209,15 @@ field_qualifier : /character set/i WORD } } -reference_definition : /references/i table_name parens_field_list(?) match_type(?) on_delete_do(?) on_update_do(?) +reference_definition : /references/i table_name parens_field_list(?) match_type(?) on_delete(?) on_update(?) { $return = { type => 'foreign_key', reference_table => $item[2], reference_fields => $item[3][0], match_type => $item[4][0], - on_delete_do => $item[5][0], - on_update_do => $item[6][0], + on_delete => $item[5][0], + on_update => $item[6][0], } } @@ -227,10 +225,10 @@ match_type : /match full/i { 'full' } | /match partial/i { 'partial' } -on_delete_do : /on delete/i reference_option +on_delete : /on delete/i reference_option { $item[2] } -on_update_do : /on update/i reference_option +on_update : /on update/i reference_option { $item[2] } reference_option: /restrict/i |