SQL::T...iagram(3pm)
π SQL::Translator::Producer::Diagram π
okay so bestie, welcome to SQL::T...iagram(3pm) β aka SQL::Translator::Producer::Diagram, the ER diagram producer for SQL::Translator π it's giving "turn your schema into a picture" and honestly? iconic.
It lives in the User Contributed Perl Documentation, and yes the name is literally truncated to SQL::T...iagram(3pm) up in the header, we don't make the rules π
β¨ NAME β¨
SQL::Translator::Producer::Diagram β ER diagram producer for SQL::Translator π¦
β¨ SYNOPSIS β¨
Use it via SQL::Translator, bestie:
use SQL::Translator;
my $t = SQL::Translator->new(
from => 'MySQL',
to => 'Diagram',
producer_args => {
# All args are optional
out_file => 'schema.png',# if not provided will return from translate()
output_type => 'png', # is default or 'jpeg'
title => 'My Schema', # default is filename
font_size => 'medium', # is default or 'small,' 'large'
imap_file => '', # filename to write image map coords
imap_url => '', # base URL for image map
gutter => 30 # is default, px distance b/w cols
num_columns => 5, # the number of columns
no_lines => 1, # do not draw lines to show FKs
add_color => 1, # give it some color
show_fk_only => 1, # show only fields used in FKs
join_pk_only => 1, # use only primary keys to figure PKs
natural_join => 1, # intuit FKs if not defined
skip_fields => [...], # list* of field names to exclude
skip_tables => [...], # list* of table names to exclude
skip_tables_like => [...], # list* of regexen to exclude tables
}
) or die SQL::Translator->error;
$t->translate;
β¨ little note, bestie: * "list" can be either an array-ref or a comma-separated string πΈ so do whatever feels right for your vibe, no cap.
π heads up: every single one of those producer_args is optional. You can just roll in with the defaults and let the diagram cook.
β¨ AUTHOR β¨
Ken Youens-Clark <kclark@cpan.org> π«Ά absolute main character energy for writing this.
and that's the whole page, bestie, we ate π β¨
cute little sign-off: this was perl v5.40.0, dated 2024-11-23, filed under the manual page name SQL::T...iagram(3pm) ππ bye ilysm, go draw some diagrams π¦
π¦ where this page comes from
- debian trixie: libsql-translator-perl 1.66-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libsql-translator-perl 1.66-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libsql-translator-perl 1.66-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms