Scroll to navigation

Autodia::Handler::SQL(3pm) User Contributed Perl Documentation Autodia::Handler::SQL(3pm)

NAME - AutoDia handler for SQL


Autodia::Handler::SQL parses files into a Diagram Object, which all handlers use. The role of the handler is to parse through the file extracting information such as table names, field names, relationships and keys.

SQL is registered in the module, which contains a hash of language names and the name of their respective language - in this case:

%language_handlers = { .. , sql => "Autodia::Handler::SQL", .. };


use Autodia::Handler::SQL;

my $handler = Autodia::Handler::SQL->New(\%Config); This creates a new handler using the Configuration hash to provide rules selected at the command line.


$handler->Parse(filename); # where filename includes full or relative path.

This parses the named file and returns 1 if successful or 0 if the file could not be opened.


This outputs the Dia XML file according to the rules in the %Config hash passed at initialisation of the object. It also allows you to output VCG, Dot or images rendered through GraphViz and VCG.

2020-06-02 perl v5.30.3