PARSEDIASQL(1p) User Contributed Perl Documentation PARSEDIASQL(1p)NAME
parsediasql - Command-line interface to Parse::Dia::SQL
SYNOPSIS
parsediasql [OPTIONS] --file FILE --db DB
OPTIONS
file - Filename of Dia file
db - Database type (e.g. 'db2')
ignore_type_mismatch - Allows foreign keys to have a different
type than the primary key it references,
if true. Default false.
uml - Use UML interpretation of the diagram,
default is ERD interpretation.
loglevel - Log verbosity, valid values are
DEBUG|INFO|WARN|ERROR|FATAL|TRACE|ALL|OFF.
backticks - Use `backtick` notation (mysql-innodb only).
DESCRIPTION
Dia is a diagram creation program for Linux, Unix and Windows released under the GPL license.
parsediasql is a Command-line interface to Parse::Dia::SQL
Parse::Dia::SQL converts Dia class diagrams into SQL.
TODO
o Add options that correspond to %param in Parse::Dia::SQL::new
SEE ALSO
Parse::Dia::SQL
AUTHOR
Parse::Dia::SQL is based on tedia2sql by Tim Ellis and others. See the AUTHORS file for details.
Modified by Andreas Faafeng, "<aff at cpan.org>" for release on CPAN.
perl v5.14.2 2012-01-24 PARSEDIASQL(1p)
Check Out this Related Man Page
Parse::Dia::SQL::Utils(3pm) User Contributed Perl Documentation Parse::Dia::SQL::Utils(3pm)NAME
Parse::Dia::SQL::Utils - Helper class for Parse::Dia::SQL.
SYNOPSIS
Not to be used directly.
DESCRIPTION
Utility functions for Parse::Dia::SQL.
set_default_pk
Define primary key column names and types for automatic generation of primary keys in tables that need them, but do not have them defined.
new
The constructor. No arguments.
new
get_node_attribute_values
Given a node with dia:attribute nodes inside it, go through the dia:attribute nodes with attribute "name='...'" and return the string
values
@infosToGet is an array of strings, where the first character is the data type to get, and the remaining characters are the name to parse
for. first character legal values are:
a = alpha
9 = numeric
b = boolean
example: aname, 9dollars, bkillOrNot
get_string_from_node
If it looks like <thingy><dia:string>value</dia:string></thingy> then we will get the 'value' part out given the node is 'thingy'.
get_value_from_object
Given an object, node name, attribute name, attribute value, and value to retrieve type, find the info and return it.
get_node_from_object
Given an object, node name, attribute name, and attribute value, return the node that has all these things.
name_case
Transform case for name comparisons to that of the database; leave unchanged if -C (preserve case) is in effect. Only sybase is known to be
case sensitive.
get_num_from_node
Return value part of <dia:enum val="value"></thingy>.
get_bool_from_node
Return value part of <thingy><dia:boolean val="value"></thingy>.
classify_multiplicity
Look at a multiplicity descriptor and classify it as 'one' (1, or 1..1), 'zone' (0..1), 'many' (n..m, n..*, where n > 1, m >= n) and
'zmany' (0..n, 0..*, where n > 1)
attlist_from_names
Generate a list of attributes from a comma-separated list of names by looking up a class' attribute table.
names_from_attlist
Generate a comma-separated list of attribute names from a list of attributes.
check_att_list_types
Check that a list of primary key attributes has types corresponding to the types in a list of foreign key attributes
get_base_type
Check that a list of primary key attributes has types corresponding to the types in a list of foreign key attributes.
Returns base type of some DMBS specific types (eg in PostgreSQL serial is integer).
AFF note: This is better implemented in each sql formatter class.
make_name
Generate a longer name from parts supplied. Except for the first part, the first letter of each part is capitalised. If lcFirstWord is set,
then any initial string of capitals in the first part is made lower case; otherwise the first part is left unchanged.
Dies if $self->{db} is not set.
The @parts_org values are save for "Desperation time" :)
name_scramble
PSuda: Name scrambling helper function, for code which auto-generates names. Takes one arg, which is string to use for md5 hashing. This
returns names which consist entirely of underscores and alphanumeric characters, and starts with one or more alpha characters.
mangle_name
Get a name to mangle and mangle it to the length specified -- avoid too much manglification if the name is only slightly long, but mangle
lots if it's a lot longer than the specified length.
add_default_pk
For -p - add a default primary key to a parsed table definition
TODO : Add a meaningful return value.
add_default_fk
For -f - add missing parts of a default foreign key to a parsed table definition.
perl v5.14.2 2011-02-16 Parse::Dia::SQL::Utils(3pm)