TableParser

TableParser parses SHOW CREATE TABLE.

Several subs in this module require either a $ddl or $tbl param.

$ddl is the return value from MySQLDump::get_create_table() (which returns the output of SHOW CREATE TALBE).

$tbl is the return value from the sub below, parse().

And some subs have an optional $opts param which is a hashref of options.  $opts->{mysql_version} is typically used, which is the return value from VersionParser::parser() (which returns a zero-padded MySQL version, e.g.  004001000 for 4.1.0).

Functions

new

sub new

parse

sub parse

Parse SHOW CREATE TABLE.

Returns

Hashref of table structure

sort_indexes

sub sort_indexes

find_best_index

sub find_best_index

find_possible_keys

sub find_possible_keys

check_table

sub check_table

get_engine

sub get_engine

get_keys

sub get_keys

get_fks

sub get_fks

remove_auto_increment

sub remove_auto_increment

remove_secondary_indexes

sub remove_secondary_indexes

_d

sub _d
sub new
sub parse
Parse SHOW CREATE TABLE.
sub sort_indexes
sub find_best_index
sub find_possible_keys
sub check_table
sub get_engine
sub get_keys
sub get_fks
sub remove_auto_increment
sub remove_secondary_indexes
sub _d
Close