.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Parse::Dia::SQL 3pm" .TH Parse::Dia::SQL 3pm "2022-11-19" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Parse::Dia::SQL \- Convert Dia class diagrams into SQL. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 6 \& use Parse::Dia::SQL; \& my $dia = Parse::Dia::SQL\->new( \& file => \*(Aqt/data/TestERD.dia\*(Aq, \& db => \*(Aqdb2\*(Aq \& ); \& print $dia\->get_sql(); \& \& # or command\-line version \& perl parsediasql \-\-file t/data/TestERD.dia \-\-db db2 .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Dia is a diagram creation program for Linux, Unix and Windows released under the \fI\s-1GNU\s0 General Public License\fR. .PP Parse::Dia::SQL converts Dia class diagrams into \s-1SQL.\s0 .PP Parse::Dia::SQL is the parser that interprets the .dia file(s) into an internal datastructure. .PP Parse::Dia::SQL::Output (or one of its sub classes) can take the datastructure and generate the \s-1SQL\s0 statements it represents. .SH "MODELLING HOWTO" .IX Header "MODELLING HOWTO" See .SS "Modelling differences from tedia2sql" .IX Subsection "Modelling differences from tedia2sql" .IP "\(bu" 4 Index options are supported. Text is taken from the \fIcomments\fR field of the \fIoperation\fR, i.e. the index. A database specific default value is used if the \fIcomments\fR field is left blank. Consult the Output sub class' constructor. .IP "\(bu" 4 Type mapping is supported. A type mapping is a user-defined column name replacement. Unlike \fItedia2sql\fR the type mapping is non-recursive. Consult \f(CW\*(C`t/data/typemap.dia\*(C'\fR for an example. .IP "\(bu" 4 Preliminary support for Dia's \fIdatabase\fR shapes is added. .IP "\(bu" 4 Table comments are used as \fItable postfix options\fR. This means per-table options (e.g. partitioning options) are supported on a per-database level. .IP "\(bu" 4 \&\fIbackticks\fR notation is supported for MySQL-InnoDB. .SH "DIA VERSIONS" .IX Header "DIA VERSIONS" Parse::Dia::SQL has been tested with Dia versions 0.93 \- 0.97. .PP Parse::Dia::SQL uses the \s-1XML\s0 \f(CW\*(C`version\*(C'\fR tag information in the \fI.dia\fR input file to determine how each \s-1XML\s0 construct is formatted. Future versions of Dia may change the internal format, and \s-1XML\s0 \f(CW\*(C`version\*(C'\fR tag is used to detect such changes. .SH "DATABASE SUPPORT" .IX Header "DATABASE SUPPORT" The following databases are supported: .IP "\s-1DB2\s0" 4 .IX Item "DB2" .PD 0 .IP "Informix" 4 .IX Item "Informix" .IP "Ingres" 4 .IX Item "Ingres" .IP "Oracle" 4 .IX Item "Oracle" .IP "Postgres" 4 .IX Item "Postgres" .IP "Sas" 4 .IX Item "Sas" .IP "SQLite3" 4 .IX Item "SQLite3" .IP "SQLite3fk (with foreign key support)" 4 .IX Item "SQLite3fk (with foreign key support)" .IP "Sybase" 4 .IX Item "Sybase" .IP "MySQL InnoDB" 4 .IX Item "MySQL InnoDB" .IP "MySQL MyISAM" 4 .IX Item "MySQL MyISAM" .PD .PP Adding support for additional databases means to create a subclass of Parse::Dia::SQL::Output. .PP Patches are welcome. .SH "AUTHOR" .IX Header "AUTHOR" Parse::Dia::SQL is based on \fItedia2sql\fR by Tim Ellis and others. See the \&\fI\s-1AUTHORS\s0\fR file for details. .PP Modified by Andreas Faafeng, \f(CW\*(C`\*(C'\fR for release on \&\s-1CPAN.\s0 .SH "BUGS" .IX Header "BUGS" Please report any bugs or feature requests to \f(CW\*(C`bug\-parse\-dia\-sql at rt.cpan.org\*(C'\fR, or through the web interface at . I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. .SH "SUPPORT" .IX Header "SUPPORT" You can find documentation for this module with the perldoc command. .PP .Vb 1 \& perldoc Parse::Dia::SQL .Ve .PP You can also look for information at: .IP "\(bu" 4 Project home .Sp Documentation and public source code repository: .Sp .IP "\(bu" 4 \&\s-1RT: CPAN\s0's request tracker .Sp .IP "\(bu" 4 AnnoCPAN: Annotated \s-1CPAN\s0 documentation .Sp .IP "\(bu" 4 \&\s-1CPAN\s0 Ratings .Sp .IP "\(bu" 4 Search \s-1CPAN\s0 .Sp .SH "SEE ALSO" .IX Header "SEE ALSO" .IP "\(bu" 4 .IP "\(bu" 4 .SH "ACKNOWLEDGEMENTS" .IX Header "ACKNOWLEDGEMENTS" See the \s-1AUTHORS\s0 file. .SH "LICENSE" .IX Header "LICENSE" This program is released under the \s-1GNU\s0 General Public License. .SH "TERMINOLOGY" .IX Header "TERMINOLOGY" By \fIdatabase\fR we mean relational database management system (\s-1RDBMS\s0). .SH "METHODS" .IX Header "METHODS" .IP "\fBnew()\fR" 4 .IX Item "new()" The constructor. Mandatory arguments: .Sp .Vb 2 \& file \- The .dia file to parse \& db \- The target database type .Ve .Sp Dies if target database is unknown or unsupported. .IP "\fBget_sql()\fR" 4 .IX Item "get_sql()" Return sql for given db. Calls underlying methods that performs parsing and sql generation.