GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Bigtop::Backend::Diagram::GraphvizSql(3) User Contributed Perl Documentation Bigtop::Backend::Diagram::GraphvizSql(3)

Bigtop::Backend::Diagram::GraphvizSql - generates dot language file for data model

If your bigtop file looks like this:

    config {
        SQL      ...      {}
        Diagram  Graphviz {}
    }
    app App::Name {
    }

and there are table blocks in the app block, this module will make docs/schema.graphviz (relative to the build_dir) when you type:

    bigtop app.bigtop Diagram

or

    bigtop app.bigtop all

This generates "docs/schema.graphviz". By default this backend also runs the following command:

    dot -Tpdf docs/schema.graphviz > docs/schema.pdf

Use backend_block_keywords described below to control the behavior.

This is a Bigtop backend which generates a file in the dot language understood by all the Graphviz tools. For information about Graphviz, please visit <http://www.graphviz.org>. To summarize, the files generated by this module can be fed through dot or neato to produce a .png file (many other formats are available) showing the data model for your project.

This module assumes you are using one of the SQL backends which will define appropriate keywords for table and field definitions. But, it defines three words of its own:
label
This is valid keyword for both the app and table levels. The app label becomes the label for the whole picture. The table label becomes the label for the record box of the table. If these label keywords are not used the app name and table name are used instead, but split on underscores and ucfirst applied to all the words which are rejoined with a single space.
quasi_refers_to
This is valid at the field level and indicates that the field's value refers to a field in another table whenever the value is not null. In the picture these links are drawn with dotted lines.

To keep podcoverage tests happy.
backend_block_keywords
Tells tentmaker that I understand these config section backend block keywords:

    no_gen
    template
    skip_layout
    layout_program
    layout_flags
    

As mentioned in the SYNOPSIS above, by default this backend runs the following command:

    dot -Tpdf docs/schema.graphviz > docs/schema.pdf
    

If skip_layout is present and true, no such command is run. All you get is docs/schema.graphviz. This flag supercedes the other keywords.

layout_program defaults to "dot", but this keyword lets you change to any other interpretter of the dot language. One of these is neato. There are others. In my humble opinion, only dot looks good for this type of diagram, so I stick with it.

layout_flags lets you pass things to your layout program. Feel free to pass anything. If you use -T, the generated file will have the -T value as its file extension. So this:

    layout_flags `-Tpng`
    

will actually execute this:

    dot -Tpng docs/schema.graphviz > docs/schema.png
    

If you omit -T a -Tpdf will be added for you. No other flags are parsed.

what_do_you_make
Tells tentmaker what this module makes. Summary: docs/schema.graphviz.
gen_Diagram
Called by Bigtop::Parser to get me to do my thing.
setup_template
Called by Bigtop::Parser so the user can substitute an alternate template for the hard coded one here.

Phil Crow <crow.phil@gmail.com>

Copyright (C) 2010 by Phil Crow

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.

2022-04-09 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.