Autodi...Torque(3pm)
β¨ NAME β¨
Autodia::Handler::Torque.pm β bestie, this is the AutoDia handler for Torque xml database schema. that's it, that's the whole vibe π
πΈ INTRODUCTION πΈ
okay so listen. this little icon gives Autodia the power to read Torque Database Schema files π and once it's read them, you can convert them via the Diagram Export methods into:
- images (using
GraphVizandVCG) π¦ - html/xml using custom templates, or
- Dia β¨
literally so many options, we love a flexible queen π
π«Ά SYNOPSIS π«Ά
use Autodia::Handler::Torque;
my $handler = Autodia::Handler::dia->New(\%Config);
$handler->Parse(filename); # where filename includes full or relative
path.
no cap, that's the whole entrance exam π
π Description π
the Torque handler will parse the xml file using XML::Simple and populate the diagram object with class, superclass, and relationships β representing tables and relationships π
the Torque handler is registered in the Autodia.pm module, which contains a hash of language names and the name of their respective language. iykyk π§
An example Torque database schema is shown here β its actually a rather nice format apart from the Java studlyCaps.. π (the audacity fr fr)
<?xml version="1.0" encoding="ISO-8859-1" standalone="no" ?>
<!DOCTYPE database SYSTEM
"http://db.apache.org/torque/dtd/database_3_0_1.dtd">
<database name="INTERPLANETARY">
<table name="CIVILIZATION">
<column name="CIV_ID" required="true" autoIncrement="true" primaryKey="true" type="INTEGER"/>
<column name="NAME" required="true" type="LONGVARCHAR"/>
</table>
<table name="CIV_PEOPLE">
<column name="CIV_ID" required="true" primaryKey="true" type="INTEGER"/>
<column name="PEOPLE_ID" required="true" primaryKey="true" type="INTEGER"/>
<foreign-key foreignTable="CIVILIZATION">
<reference local="CIV_ID" foreign="CIV_ID"/>
</foreign-key>
<foreign-key foreignTable="PEOPLE">
<reference local="PEOPLE_ID" foreign="PEOPLE_ID"/>
</foreign-key>
</table>
<table name="PEOPLE">
<column name="PEOPLE_ID" required="true" autoIncrement="true" primaryKey="true" type="INTEGER"/>
<column name="NAME" required="true" size="255" type="VARCHAR"/>
<column name="SPECIES" type="INTEGER" default="-2"/>
<column name="PLANET" type="INTEGER" default="-1"/>
</table>
</database>
slay π a whole interplanetary database just sitting there, main character energy fr.
π₯ METHODS π₯
π CONSTRUCTION METHOD π
use Autodia::Handler::Torque;
my $handler = Autodia::Handler::Torque->New(\%Config);
This creates a new handler using the Configuration hash to provide rules selected at the command line β¨
π« ACCESS METHODS π«
$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. π (we've all been there, bestie)
π SEE ALSO π
AutodiaTorqueAutodia::Handler
and that's the whole page babes π
β this gorgeous thing comes to you courtesy of the User Contributed Perl Documentation for Autodi...Torque(3pm), running on perl v5.36.0, dated 2022-11-02. obsessed with her, honestly. periodt πβ¨π¦
π¦ where this page comes from
- debian bookworm: autodia 2.14-5 Β· GPL-2.0-only
- debian trixie: autodia 2.14-5 Β· GPL-2.0-only
- ubuntu noble: autodia 2.14-5 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms