From: Ken Youens-Clark Date: Tue, 14 Apr 2009 21:23:55 +0000 (+0000) Subject: Fixed name, perl. X-Git-Tag: v0.11008~208 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d5132e1905bca7e99ece09efc89800409bea2214;p=dbsrgits%2FSQL-Translator.git Fixed name, perl. --- diff --git a/bin/sqlt-graph b/bin/sqlt-graph index 0dab71f..e168390 100755 --- a/bin/sqlt-graph +++ b/bin/sqlt-graph @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl # ------------------------------------------------------------------- # Copyright (C) 2002-2009 SQLFairy Authors @@ -40,6 +40,7 @@ sqlt-graph - Automatically create a graph from a database schema "png," "wbmp," "cmap," "ismap," "imap," "vrml," "vtx," "mp," "fig," "svg," "plain," default "png") -c|--color Add colors + --cluster Cluster tables --no-fields Don't show field names --height Image height (in inches, default "11", set to "0" to undefine) @@ -87,11 +88,16 @@ If the schema defines foreign keys, then the graph produced will be directed showing the direction of the relationship. If the foreign keys are intuited via natural joins, the graph will be undirected. +The syntax for clustering tables into groups is: + + cluster1=table1,table2;cluster2=table3,table4 + =cut # ------------------------------------------------------------------- use strict; +use warnings; use Data::Dumper; use Getopt::Long; use GraphViz; @@ -108,7 +114,8 @@ my ( $layout, $node_shape, $out_file, $output_type, $db_driver, $add_color, $natural_join, $join_pk_only, $skip_fields, $show_datatypes, $show_sizes, $show_constraints, $debug, $help, $height, $width, - $no_fields, $fontsize, $fontname, $skip_tables, $skip_tables_like + $no_fields, $fontsize, $fontname, $skip_tables, $skip_tables_like, + $cluster ); # multi-valued options: @@ -130,6 +137,7 @@ GetOptions( 'edgeattr=s' => \%edgeattrs, 'graphattr=s' => \%graphattrs, 'c|color' => \$add_color, + 'cluster:s' => \$cluster, 'no-fields' => \$no_fields, 'natural-join' => \$natural_join, 'natural-join-pk' => \$join_pk_only, @@ -166,6 +174,7 @@ my $translator = SQL::Translator->new( show_datatypes => $show_datatypes, show_sizes => $show_sizes, show_constraints => $show_constraints, + cluster => $cluster, height => $height || 0, width => $width || 0, fontsize => $fontsize, @@ -194,7 +203,7 @@ for my $file (@files) { =head1 AUTHOR -Ken Y. Clark Ekclark@cpan.orgE. +Ken Youens-Clark Ekclark@cpan.orgE. =head1 SEE ALSO