NAME

MySQL::Workbench::Parser::Table - A table of the ER model

VERSION

version 0.06

as_hash

return info about a table as a hash

my %info = $table->as_hash;

returns

(
    name         => 'table_name',
    primary_key  => [ 'id' ],
    foreign_keys => {
        second_table => [
            {
                foreign => 'id',
                me      => 'second_id',
            },
        ],
    },
    columns      => [
        name          => 'id',
        datatype      => 'INT',
        length        => '',
        precision     => '0',
        not_null      => '1',
        autoincrement => '1',
        default_value => '',
    ],
)

get_datatype

get datatype for a workbench column datatype

my $datatype = $table->get_datatype( 'com.mysql.rdbms.mysql.datatype.mediumtext' );

returns the MySQL name of the datatype

MEDIUMTEXT

AUTHOR

Renee Baecker <reneeb@cpan.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2013 by Renee Baecker.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)