Autodi...Torque(3pm)

πŸ“¦
version 2.14 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu noble

✨ 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 GraphViz and VCG) πŸ¦‹
  • 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 πŸ‘‘

  • Autodia
  • Torque
  • Autodia::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