X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FSQL%2FTranslator%2FParser.pm;h=1e8a655de0107d8df3c82bd50d89d1379c33fc5d;hb=5f56cfe917753189617cb7032419ddcb52bf53f4;hp=6bae3b87236b1a7697b0d8d2c2b2eeafce9c8c13;hpb=8295a8cca61986fbccca2c381867219a9403640c;p=dbsrgits%2FSQL-Translator.git diff --git a/lib/SQL/Translator/Parser.pm b/lib/SQL/Translator/Parser.pm index 6bae3b8..1e8a655 100644 --- a/lib/SQL/Translator/Parser.pm +++ b/lib/SQL/Translator/Parser.pm @@ -1,10 +1,11 @@ package SQL::Translator::Parser; # ---------------------------------------------------------------------- -# $Id: Parser.pm,v 1.1.1.1.2.2 2002-03-21 15:47:08 dlc Exp $ +# $Id: Parser.pm,v 1.6 2003-01-27 17:04:44 dlc Exp $ # ---------------------------------------------------------------------- -# Copyright (C) 2002 Ken Y. Clark , -# darren chamberlain +# Copyright (C) 2003 Ken Y. Clark , +# darren chamberlain , +# Chris Mungall # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as @@ -23,17 +24,18 @@ package SQL::Translator::Parser; use strict; use vars qw( $VERSION ); -$VERSION = sprintf "%d.%02d", q$Revision: 1.1.1.1.2.2 $ =~ /(\d+)\.(\d+)/; +$VERSION = sprintf "%d.%02d", q$Revision: 1.6 $ =~ /(\d+)\.(\d+)/; sub parse { "" } 1; -#----------------------------------------------------- +# ---------------------------------------------------------------------- # Enough! or Too much. # William Blake -#----------------------------------------------------- -__END__ +# ---------------------------------------------------------------------- + +=pod =head1 NAME @@ -75,9 +77,9 @@ This is the type of the table, if applicable, as a string, or undef if not (for example, if the database does not have multiple options). For MySQL, this value might include MyISAM, HEAP, or similar. -=item B +=item B -The indeces keys is a reference to an array of hashrefs. Each hashref +The indices keys is a reference to an array of hashrefs. Each hashref defines one index, and has the keys 'name' (if defined, it will be a string), 'type' (a string), and 'fields' (a reference to another array). For example, a table in a MySQL database with two indexes, @@ -87,7 +89,7 @@ created as: KEY foo_idx (foo), KEY foo_bar_idx (foo, bar), -would be described in the indeces element as: +would be described in the indices element as: [ { @@ -121,6 +123,7 @@ the row names from the table, and each value fills in this template: { type => 'field', + order => 1, # the order in the original table name => '', # same as the key data_type => '', # in the db's jargon, # i.e., MySQL => int, Oracale => INTEGER @@ -141,6 +144,7 @@ would be represented as: 'fields => { 'username' => { type => 'field', + order => 1, name => 'username', data_type => 'char', size => '8', @@ -150,7 +154,7 @@ would be represented as: is_primary_key => undef, }, }, - 'indeces' => [ + 'indices' => [ { 'name' => 'username_idx', 'fields' => [ @@ -165,7 +169,8 @@ would be represented as: =head1 AUTHORS -Ken Y. Clark, Ekclark@logsoft.comE, darren chamberlain Edarren@cpan.orgE +Ken Y. Clark, Ekclark@cpan.org, +darren chamberlain Edarren@cpan.orgE. =head1 SEE ALSO